Copy link to clipboard
Copied
I want to change all the acronyms in the book to small caps using GREP but keep certain words capitalised so for example I want FBI and NATO to be changed to small caps but I need REDACTED and US to stay as full caps. I can change the case of them using Peter Kahrel's script so that's not a problem, I just need to be able to change them all into a 'small caps' character style. Basically I need the code to say find any uppercase letter twice or more but NOT (US|REDACTED). I'm sure there's a simple expression that says find this but not this, I just don't know what it is!
There probably is a clever GREP expression to do it all in one go, but I would just:
1. Find US or REDACTED and apply a new colour to it (or underline, if you don't use that anywhere else).
2. Then find 2 or more uppercase letters \u{2,} that are black (or not underlined) and change them to small caps.
3. Then delete the new colour you created.
Ariel
Copy link to clipboard
Copied
There probably is a clever GREP expression to do it all in one go, but I would just:
1. Find US or REDACTED and apply a new colour to it (or underline, if you don't use that anywhere else).
2. Then find 2 or more uppercase letters \u{2,} that are black (or not underlined) and change them to small caps.
3. Then delete the new colour you created.
Ariel
Copy link to clipboard
Copied
Try this...
(?!REDACTED|US)\b\u\u+\b