Copy link to clipboard
Copied
Hello. I've tried this (https://community.adobe.com/t5/indesign-discussions/grep-query/m-p/14365227) for applying a character style to text within parentheses but must not be changing the correct portion of the string to ( ).
Hi @Parny:
Nevermind! I see the issue. The OP was targeting text within brackets. You are targeting text within parentheses.
This would do it: \(\K[^\]]+?(?=\))
But: you want to include the parentheses., so
\(.+?\)
Since this is an entirely different question, I'm going to move it to its own thread.
~Barb
Copy link to clipboard
Copied
Can you share a screenshot that includes the GREP style and the result?
~Barb
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Or is it a Find/Change string, not using the GREP window?
Copy link to clipboard
Copied
I was trying the string \[\K[^\]]+?(?=\]), which was in a discussion early this year.
Copy link to clipboard
Copied
You can do with the a GREP style but these strings can be tough to troubleshoot: could you show your GREP as is appears in the style options dialog box? (Not copy/paste the string here?)
~Barb
Copy link to clipboard
Copied
Hi @Parny:
Nevermind! I see the issue. The OP was targeting text within brackets. You are targeting text within parentheses.
This would do it: \(\K[^\]]+?(?=\))
But: you want to include the parentheses., so
\(.+?\)
Since this is an entirely different question, I'm going to move it to its own thread.
~Barb
Copy link to clipboard
Copied
Barb, thanks for your help. I'm not handling this correctly still. I guess I didn't place \(.+?\) in its correct place in the string?
Copy link to clipboard
Copied
Can you share your Paragraph Styel Options > GREP Style screenshot?
~Barb
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Yes, I highly recommend purchasing a copy of Peter Kahrel's book: GREP in InDesign.
~Barb
Copy link to clipboard
Copied
Many thanks!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now