Skip to main content
Inspiring
May 21, 2025
Answered

Grep expression with InDesign doesn't seem to work

  • May 21, 2025
  • 1 reply
  • 203 views

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?

 

 

Correct answer m1b

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.

1 reply

m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
May 21, 2025

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.

Inspiring
May 21, 2025

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