Reply To: GREP: changing the style of percentages within body copy

Home Page / Forums / General InDesign Topics (CLOSED) / GREP: changing the style of percentages within body copy / Reply To: GREP: changing the style of percentages within body copy

#14338779
David Blatner
Keymaster

Actually, in this case it’s not needed. I do it out of habit.
Here’s where it comes in handy… given the sentence:
There are 1 (one) or 2 (two) options
And if you use grep to search for \(.+\) (which means “find everything between two parentheses) then it will find “(one) or 2 (two)” — that is, all the way from the first open paren to the last close paren.
But if you add the ? after the +, then it would just find “(one)” and then it will find “(two)”
So the ? sort of means “find the shortest amount of text that works.

This article was last modified on April 22, 2021

Comments (0)

Loading comments...