Test, validate and match regular expressions
This regex matches strings enclosed in either single or double quotes, correctly handling escaped characters (like `\"` or `\'`) within the quotes. It uses a backreference to ensure the closing quote perfectly matches the opening quote. The possessive quantifier `*+` is utilized for optimization to prevent catastrophic backtracking. With the global and multiline flags, it is highly effective for extracting quoted text across multiple lines in source code or configuration files.