I want to write a regular expression that will captures all double quotes " in a string, except for those that are escaped.
For example, in the following String will return the first quote only:
"HELLO\"\"\"
but the following one will return 3 matches:
"HELLO\"\""\""
I have used the following expression, but since in JavaScript there is no negative lookbehind I am stuck:
(?<!\\)"
I have looked at similar questions but most provide a programmatic interface. I don't want to use a programmatic interface because I am using Ace editor and the simplest way to go around my problem is to define this regex.
I suppose there is no generic alternative, since I have tried the alternatives proposed to the similar questions, but non of them exactly matched my case.
Thanks for your answers!