1

I'm trying to set up a GREP which will find the proper nouns in my document and apply a character style to them which I will then use to preclude them from a spellcheck (I'm trying to avoid having to skip all the names when I spellcheck docs). I have CreativePro to thank for this idea: https://creativepro.com/turn-off-spell-check-for-certain-words-in-indesign-like-catalog-part-numbers/

The GREP I am using is this:

((?<=\l )\u\l+)

I have tried to get it to ignore words starting with a capital letter after a full stop by specifying that only words starting with a capital after a lowercase letter and a space should be used. This works unless there are two proper nouns in succession in which case it only applies the style to the first and third nouns, and so on and so forth. How do I get it to apply to all the proper nouns in the document without also applying to the first capitalised word of a new sentence?

1 Answer 1

2

I don't have a proper answer, but I have a bit of a kludge. The following should do what you want for up to three capitalized words in a row.

((?<=\l )(\u\l+)( \u\l+)?( \u\l+)?)

You can always add ( \u\l+)? as many times as needed if you need more.

Side note: As it is, your GREP will not find names like DePalma with a capital letter in them. The following fixes the issue:

((?<=\l )(\u\w+)( \u\w+)?( \u\w+)?)
2
  • Brilliant thanks. There will be a few instances where it doesn't catch a proper name (such as after a comma or colon), but if it finds most of them and precludes the majority, it'll still save me time on the spellcheck which is the main thing. Ta! Commented Mar 15 at 10:51
  • 1
    Your suggested amendment to catch DePalmas works a treat. For anyone in the future reading this with the same intention, to find proper nouns after commas and semicolons you can just run (\, \u\w+) followed by (\; \u\w+) Commented Mar 15 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.