Skip to main content
Inspiring
May 21, 2025 2:12 PM UTC
Answered

Grep expression with InDesign doesn't seem to work

My reg-ex fu is weak today: (I don't know what flavour of Regular Expression Indesign uses)

I'm trying to find any lowercase laters that follow a colon.

 

\:\s?[a-z]

Works fine here But that finds nothing in my design document.

 

Should match items in bold underline

Bananas: thats and that
Note: This
but: not that
Elephants: 1 or not
Annything:goes:

 

Any ideas?

 

 

m1b
m1bCorrect answer
Community Expert
May 21, 2025 2:19 PM UTC

Hi @Ghoul Fool, Indesign uses PCRE flavoured regular expressions. In your case, how about this...

:\s?\K\l

- Mark 

 

P.S. the \K symbol means Match Reset—discard everything matched so far and start again.

2 replies

m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
May 21, 2025 2:19 PM UTC

Hi @Ghoul Fool, Indesign uses PCRE flavoured regular expressions. In your case, how about this...

:\s?\K\l

- Mark 

 

P.S. the \K symbol means Match Reset—discard everything matched so far and start again.

Translate
Inspiring
May 21, 2025 4:30 PM UTC

Thanks. That explains that! Don't know perl, me! 🙂

Translate