What I want to know is how to modify following regex: \".*?\"
so it will ignore escaped " character (\"
) so it won't end matching at \"
.
For example:
parameter1 = " fsfsdfsd \" " parameter2 = " fsfsfs "
I want to match:
" fsfsdfsd \" "
and
" fsfsfs "
but not
" fsfsdfsd \" " parameter2 = " fsfsfs "
etc...
Try this one:
"(?:\\"|[^"])*"
It matches "test \"
though(you can probably avoid that using lookbehind). Escape the character if you need using \