Test, validate and match regular expressions
This regex matches single-quoted strings while handling escaped single quotes (\') within them. It uses three alternatives: one for strings containing escaped quotes (capturing the full content), one for fragments after escaped quote boundaries, and one for simple quoted strings without escapes. Commonly used for parsing string literals in SQL queries or programming languages with backslash escaping.