15 Replies Latest reply on Jul 26, 2013 7:51 AM by Peter Spier

    GREP expression question

    mikescott7 Level 1

      Hi

      I'm trying to apply a character style to a certain string of text at the end of a paragraph, bolding the name after an em dash at the end of the graph.

      For example:

       

      Thank goodness for Judge Barker. It’s about time. Stop letting this guy pretend this isn’t really happening to him. If they have to they should hold his eyes open for him. — Zongo11

       

      So that the "—Zongo11" or any other similar string would be bold.

       

      I tried this below, and it works, but if another em dash is in the paragraph, the entire string of text after the first em dash gets bolded.

       

      \s*—\s*.+$ ??

       

      I also tried a positive look behind like this:

       

      (?<=\s*—\s*.+)$ or (?<=\s*—\s*.+)\r

       

      But this doesn't apply the character style at all.

      Can someone tell me what I'm doing wrong and offer suggestions?

      Thanks,

      M