1 Reply Latest reply on Aug 24, 2011 2:58 AM by Mac_06

    lookbehind

    Edo75 Level 1

      Hi,

       

      What grep pattern for a  "Lookbehind" with app.findGrepPreferences.findWhat ? How can I achieve that kind of operation to make a superscript for m2 or m3?

       

      Thanks in advance!

        • 1. Re: lookbehind
          Mac_06 Level 2

          To see the Grep exp. for "Positive lookbehind" or "Nagative lookbehind" scroll in Match context menu in Find grep.

           

          app.findGrepPreferences.findWhat = "(?<=m)\\d+"
          app.changeGrepPreferences.position=Position.superscript
          app.activeDocument.changeGrep();
          

           

          e.g. above code make '2' as superscript in 'm2'.

           

          Mac