What would be a basic regular expression which finds some string if given the string quuz="bleh" foo="some string" bar="some other string" where some string and some other string are arbitrary strings.
What would be a basic regular expression which finds some string if given the
Share
Any string between quotes:
Any string between quotes called
foo:Any string between quotes, handling escaped quotes correctly, i. e. matching
2\" by 4\"in"2\" by 4\"":In all cases, the overall match includes the surrounding quotes; the capturing group
$1will contain the string you’re interested in. How to access that depends on your regex implementation.