GREP Expression Help
- This topic has 4 replies, 3 voices, and was last updated 8 years, 11 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / GREP Expression Help
Learn / Forums / General InDesign Topics / GREP Expression Help
Hello folks,
I need help with a GREP expression. I’m using the following expression to find everything between parentheses: \(.+?\)
What I want to do is one of the following two things but I need both expressions so then I can choose which one I want to keep. I want to replace it by leaving the text in between the brackets but removing the brackets themselves, and another expression to replace the round brackets with square ones, in both cases the text is to be left as it is.
Thank you.
“I want to replace it by leaving the text in between the brackets but removing the brackets themselves,”
Find: \(([^)]+)\)
Replace: $1
“and another expression to replace the round brackets with square ones, in both cases the text is to be left as it is.”
Find: \(([^)]+)\)
Replace: [$1]
As you can see its the same GREP search, the only thing that changes is what you are putting in the replace field.
Amazing, worked a treat, many thanks.
oh good, I’m glad I could help.
Good one Ron.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!