7 Replies Latest reply on Jun 5, 2014 4:23 AM by Doug A Roberts

    GREP apply style, excude text in brackets

    Doug A Roberts Adobe Community Professional & MVP

      I'm just starting to figure out some ways I can use GREP in the confusing mess of documents I have to work with here, so bear with me...


      We have a load of technical authors here who don't necessarily have much InDesign experience, but have to use it to input text. Some text has to be bold to alert the end user, so I thought I could use GREPs to apply a bold style to certain words and phrases that occur throughout documents. One such instance is for users to renew clips or bolts or suchlike, so I've made what I think is a GREP that finds 'renew' and applies to every word between it and a return or a period (but excludes the word 'renewed', because other permutations might follow that):


      renew (?!ed.*?).+(\.|\r)


      Which works fine in most places. But I came across instances where there is an image reference in brackets after instances of 'renew' in places (such as 'you must renew the clips (refer to illustration 6)') and I'd like to exclude the brackets and their contents from the style. But as a beginner I got a bit bogged hitting brick walls trying to find ways to do this. Can anyone offer a suggestion?


      Thank you for any help.