I'm using a regex to match strings in a source file. I have a regex:
(["'])(?:(?=(\\?))\2.)*?\1
It matches the opening and closing quotes only if they are on the same line. For example,
"hello world!"
matches, but
"hello
world!"
does not.
Is it possible to modify this so that both cases are matched?