I'm trying to automatize giving character styles to the editor given names (not the author names) in literature sources like this one via Find/Change (not GREP styles):
Jacobs, G. A., Boero, J. V., Quevillon, R. P., Todd-Bazemore, E., Elliott, T. L. & Reyes, G. (2002). Floods. In A. M. La Greca, W. K. Silverman, E. M. Vernberg & M. C. Roberts (Eds.), Helping children cope with disasters and terrorism (pp. 157 – 174). Washington, DC: American Psychological Association.
Doing that, I want to grap any capital letter followed by a dot AFTER the word In in a paragraph. Since the regular lookbehind (?<=) won't work with . and + opperators, I use \K
As an additional info to this particular case: Using a fine-tagging script, everything is already tagged with different character and paragraph styles, the script just has problems with the double/multiple given names of the editors which is why I'm trying to find them manually to correct them. I can't post the script here since it's not mine to give.
what I have:
I managed to grab all double or more names (singular is for a reason not necessary) which come after the word In:
(In )\K([\u]\.( [\u]\.)+)
I managed to grab double or more names after the first occurence:
(In [\u]\.( [\u]\.)* .+(\,|\&) )\K([\u]\.( [\u]\.)+)
I have multiple things not working out:
1. finding more than one occurence
The second query only finds the last occurence, not the ones inbetween. Since .+ looks for everything that comes before f.e. M. C., it seems to include any occurence that come before the last. I just can't seem to find a way to grab all occurences. Does anyone know a way or is this simply not possible
2. combining the search with "or" |
Both queries work for themself but I can't combine them with "or". Now in general it does work with simpler test queries but with the ones above. Possibly because the first query is a part of the second.
Does anyone have an idea how this could work?
Thanks in advance