Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How do you chain GREP patterns in InDesign?

Contributor ,
Feb 19, 2022 Feb 19, 2022

Copy link to clipboard

Copied

In regex, I can use this to highlight quotation marks:

"([^"]*)"

And if I want to add another pattern, and can use the pipe symbol like this:

\b("([^"]*)"|'([^']*)')\b

This will match single and double quotes. However this syntax with the pipe doesn't seem to work in InDesign.How can I get this to work?

TOPICS
How to

Views

186
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 19, 2022 Feb 19, 2022

Copy link to clipboard

Copied

I can't edit the obvious mistake out, so here's the question again, without the mistake that I am not allowed to correct:

In regex, I can use this to highlight quotation marks:

"([^"]*)"

And if I want to add another pattern, and can use the pipe symbol like this:

"([^"]*)"|'([^']*)'

This will match single and double quotes. However this syntax with the pipe doesn't seem to work in InDesign. How can I get this to work in GREP in InDesign?

 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2022 Feb 19, 2022

Copy link to clipboard

Copied

LATEST

You can put them together in a single class as literals: ['"]

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines