2 Replies Latest reply on Mar 15, 2013 8:07 AM by maxhodges0

    Grep replace issue

    maxhodges0 Level 1

      I'm trying to us GREP in scripting to modify the style of some words designated with markup. For example: "The ^SUN^ and the ^MOON^ are celestial bodies."

       

      app.FindGrepPreferences.FindWhat = "(\^.+?\^)"


      I use this grep statemen to find "^SUN^" and "^MOON^", and I can change their characterstyle, but I also want to remove the "^" marks at the same time if possible.

       

      Is there way to set an expression in my .toChange property so I can replace my selection with everything between the two  "^" marks? That is, I want change "^XXX^" to become "XXX".