Test, validate and match regular expressions
Matches a complete C-like string literal delimited by either single or double quotes, using a conditional so the opposite quote may appear unescaped inside. Supports backslash escape sequences (rejecting escapes followed by CR, LF, or space) and enforces matching delimiters via a backreference to the opening quote. With the gm flags it scans line-by-line, making it ideal for tokenizing, linting, or extracting string literals from source code.