GREP at the begining with any Letter
Hello,
I try to remove the comma in an Index Reference, always at the beginning of the paragraph, followed by the letter g
INCORRECT:
Human, g
human, g
CORRECT:
Human g
human g
But is not working:
replaceTextUsingGREP ("((\^\[\\l\\u\]\*\?)$)(, g)","$1 g");
function replaceTextUsingGREP (input, output) {
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = input;
app.changeGrepPreferences.changeTo = output;
//app.activeDocument.changeGrep();
var changedResults = app.activeDocument.changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
}
Please, do you know what is wrong?
Thanks so much.