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

#100171
John Tierney
Member

Is there a way of using a positive look behind to find the beginning of a paragraph and then any letter or space character in the text preceding the first price? The second price would have space characters, letter characters and digit characters preceding it. The first appearance of the “$” will never have digits preceding it. I am not sure how to write it. I have tried:

(?<=^[\u.]+) to find any letter or space after the beginning of the paragraph and before the first “$”.

I end up with

(?<=^[\u.]+)(\$[\d\.]+) which I thought would find only the first price of any paragraph.

But it doesn’t seem to work.

This article was last modified on December 7, 2017

Comments (0)

Loading comments...