2 Replies Latest reply on Aug 10, 2017 1:48 AM by Jump_Over

    GREP for ;


      I have the following line:


      Autor 1; Autor 2; Autor 3


      How to use GREP to find the "Autor 1" and add a character style to it?


      Thanks in advance.

        • 1. Re: GREP for ;
          Laubender Adobe Community Professional & MVP

          is this a scripting question?

          If yes, would you like to use InDesign's GREP functionality or a simple RegExp statement on a string?


          Does "Autor 1" stand for a variable that can hold any name?

          Tell us more about the position of "Autor 1;" in the text flow.

          Could it be everywhere? Or just at the beginning of a paragraph?

          Other specifics?



          • 2. Re: GREP for ;
            Jump_Over Level 5



            You can use a findGrep formula like

            ^.*?(?<=;)     for including semicolon


            ^.*?(?=;)     to match without semicolon


            I suggest to run it with a selection as a target since this is very general condition (many matches possibly)




            I would recommend to use nested paragraphStyle to keep this format in dynamic mode

            use a condition:     upto 1st occurrence of semicolon