Is there a way to backlink in a regex pattern?
Example input line:
Here is "some quoted" text.
Say I want to pull out the quoted text, I could create the following expression:
"([^"]+)"
This regular expression will match some quoted.
Say I want it to support single quotes, I could change the expression to:
["']([^"']+)["']
But what if the input string contains a mixture of quotes, say Here is 'some quoted" text., I would not want the regular expression to match. Currently, the regex in the second example will still match.
, , , - , . - , .
?
: