4 Replies Latest reply on Mar 20, 2012 3:10 PM by Peter Spier

    GREP expression question

    smulls

      I have successfully built a GREP expression that applies a character style to all text that begins with “(ref.”   and ends with    “)”  

       

      \(ref[.].+\)

       

      It works great and produces something like this:

      ...hood, as well as the fabric of the community as a whole.  The Community supports quality architectural and site design that is consistent with community expectations (ref. GP-4).

       

      Here’s where I get stuck. There are times when there are multiple sets of text that that meet the criteria in the same paragraph. The results look like this:

       

      ...hood, as well as the fabric of the community as a whole.  The Community supports quality architectural (ref. GP-4) and site design that is consistent with community expectations (ref. GP-4).

       

      but i need this:

       

      ...hood, as well as the fabric of the community as a whole.  The Community supports quality architectural (ref. GP-4) and site design that is consistent with community expectations (ref. GP-4).


       

      I’m very new to GREP and cannot figure out how to apply this character style, limiting it to just the text that starts with “(ref.” and ends with “)” and anything in between defaults to the paragraph style in which this expression is nested.

       

      Suggestions?

       

       

      smulls