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

GREP find anything inside parentheses individually

Explorer ,
Jan 19, 2023 Jan 19, 2023

Copy link to clipboard

Copied

I'm using this grep \(.+\) to find anything inside parentheses, but if there are two sets of parantheses in the same paragraph then it finds both of them together with whatever is between them, is there a way to limit this so it finds only the first set then the next?

TOPICS
How to

Views

87

Likes

Translate

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

correct answers 1 Correct answer

Explorer , Jan 19, 2023 Jan 19, 2023

found it, \(.+?\) solves the problem, but when it is combined with other grep it still finds more than one set, to solve that problem you can look at this link: https://community.adobe.com/t5/indesign-discussions/how-to-combine-shortest-match-with-location-using-grep-styles/m-p/8833662 

Likes

Translate

Translate
Explorer ,
Jan 19, 2023 Jan 19, 2023

Copy link to clipboard

Copied

found it, \(.+?\) solves the problem, but when it is combined with other grep it still finds more than one set, to solve that problem you can look at this link: https://community.adobe.com/t5/indesign-discussions/how-to-combine-shortest-match-with-location-usin... 

Likes

Translate

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 ,
Jan 20, 2023 Jan 20, 2023

Copy link to clipboard

Copied

LATEST

What if you have text like this

This is sample text (containing text within (parenthesis) as an example)

 

Plus your grep is inclusive of the parenthesis but you say anything inside.

 

Anyway - missing a very simple instruction
\(.+?\)

 

 

 

 

Likes

Translate

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