Skip to main content
Yeshurun Kubi
Participant
February 14, 2019
Answered

Grep - what is the base syntax of InDesign grep

  • February 14, 2019
  • 2 replies
  • 2911 views

There are many regex syntax, one different from the other: .Net regex, Java regex, PCRE regex, Python regex. etc.

Some sites for checking regex expressions are just great - like Regex101 or RegExr [that is mentioned on InDesignSecrets], but it has different languages.

The RegExr supports only JavaScript and PHP/PCRE.

I really wish to know what is the base syntax of the Grep on InDesign?

If anyone kindly refer to documentation about the language that it is based on?

Thanks!

This topic has been closed for replies.
Correct answer Colin Flashman

According to Peter Kahrel's title "GREP in InDesign 3rd Edition" (ISBN: 978-0-9825083-6-7) - InDesign’s GREP uses the Boost libraries; information on these libraries is available from www.boost.org, especially Perl Regular Expression Syntax - 1.67.0

2 replies

Colin Flashman
Community Expert
Colin FlashmanCommunity ExpertCorrect answer
Community Expert
February 18, 2019

According to Peter Kahrel's title "GREP in InDesign 3rd Edition" (ISBN: 978-0-9825083-6-7) - InDesign’s GREP uses the Boost libraries; information on these libraries is available from www.boost.org, especially Perl Regular Expression Syntax - 1.67.0

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
Yeshurun Kubi
Participant
February 17, 2019

For I get no response for that, I think it will be acceptable to share what I assume to be 'InDesign grep flavor', though i can not know for sure.

I think it is based on Perl or PCRE engine.

I have tried to use the 'R' expression, like it is explained on regular-expressions.info and you can see it HERE.

It worked just great on InDesign. This expression is not widely supported - see HERE.

Participating Frequently
February 17, 2019

Hi,

I found an article, that says “like the Unicode Character Properties that Perl uses. Maybe InDesign’s GREP uses the Perl Compatible Regular Expressions library”

Advanced InDesign/InCopy GREP Commands | Ryan Macklin