6 Replies Latest reply on Jul 6, 2015 1:20 PM by Peter Spier

    Grep expression to include open/close "

    machipot

      Hi,

      I am using a GREP expression to locate each word between double quotes ("word")

       

      app.findGrepPreferences = null;

      app.findGrepPreferences.findWhat =  '(?<=").*?(?=")';

      var results = story.findGrep();

       

       

      for(var i = results.length - 1; i >=0; i--){

       

      myText = results[i].contents;

       

      app.findTextPreferences.findWhat = myText;

       

       

      app.changeGrepPreferences.changeTo = "same word"; //  remove the quotes AND make the word Bold

       

      app.changeTextPreferences.FontStyles = "bold";

       

      story.changeGrep();

       

       

      any idea?

      Thank you