Is there some way to check the value of $1 and if it is equal to "left" then replace with "newleft"?
Something like this: str.replace(re, 'Blah blah $2, $1="left" ? "newleft": "something" ');
str.replace(re, 'Blah blah $2, $1="left" ? "newleft": "something" ');
Aucun commentaire:
Enregistrer un commentaire