The following regex matches substrings inside quotation marks:
^("[^"]*")$
"Dialogue," she said. "More dialogue."
I don't want to catch the quotation marks (only what's inside the quotation marks). So I figured I should use a lookahead and a lookbehind:
^((?<=")[^"]*(?="))$
But now the regex isn't matching anything.
Why is this? And how to fix it?
EDIT: Removing the outer capture group kind of worked, but now she said
is being caputerd too. (?<=")[^"]*(?=")