Quantcast
Channel: Adobe Community : All Content - InDesign
Viewing all articles
Browse latest Browse all 62281

GREP expression question

$
0
0

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


Viewing all articles
Browse latest Browse all 62281


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>