Test, validate and match regular expressions
Matches string literals delimited by either single or double quotes, correctly handling escaped characters within the strings. The global flag (g) enables finding all string occurrences in source code. Commonly used in lexers, parsers, or syntax highlighting tools to extract string constants from JavaScript or other programming languages.