Reply To: Using GREP in paragraph style to format only the first occurrence of a phrase

Home Page / Forums / General InDesign Topics (CLOSED) / Using GREP in paragraph style to format only the first occurrence of a phrase / Reply To: Using GREP in paragraph style to format only the first occurrence of a phrase

#100166
Aaron Troia
Participant

John,

That is a good question, I tried using the ^ to signify the start of the line to get more specific, but it seems GREP Styles does not like that, I can either find the first $9.99 or all of them, there’s no middle ground. Its like they make it so you cant get too specific. I might ditch the GREP Style and just do a GREP search, I tried it with the RegEX below and it worked fine, but it wouldnt work as a GREP Style. Weird.

Fine: ^[^$]+\K\$[^ ]+
Replace: $0

Sorry it’s not exactly what you were asking for, but that should work.

Aaron

This article was last modified on December 7, 2017

Comments (0)

Loading comments...