7 Replies Latest reply on Mar 30, 2014 12:20 PM by pixxxel schubser

    Tricky GREP style required…using a non-marking subexpression to find space characters

    wideEyedPupil Level 1

      I have section headings in my document that have a Paragraph style applied to them. They are always of the form \d\.\d\.\d\.\d(\t) follow by a short sentance of text. For eg:

       

      5.2.2.1     The rain in Spain falls gently on the crane

       

      I am looking for a GREP style that can underline every word character with a character style but not the spaces between the words. It seems to involve nested iterations which I'm not sure how to do including a non-marking expression. Well it aint working how I think it should…

       

       

      5.2.2.1     The rain in Spain falls gently on the crane



      I think this GREP style should get it:  (?<=\t)((\S)+(?:\s))+   The positive looks back on the Tab between the last digit of section number and first word but the non-marking subexpressions are not excepting the spaces from underlining, instead I end up with all the Head Text underlines like so:

       


      5.2.2.1     The rain in Spain falls gently on the crane