This content has been marked as final. Show 3 replies
i would recomend using the built in indesing grep search and replace. which is in short:
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = "~<";
app.findGrepPreferences.changeTo = "";
Found this approach on Dave Saunders's blog :
var myRG = new RegExp("\u2009", "g");
myString = myString.replace(myRG, '');
As you see, I needed to specify the unicode code for thin space. As gfellenz said, using "~<" did not work.
I'm very grateful to you both. I'm manipulating strings to be used
outside of the document, so I have to use a script. The Unicode
solution works fine, of course. Can I assume that any regex I find
in the F&R GREP box that isn't in Gordon McKinney's quick reference
has to be treated specially?