Test, validate and match regular expressions
Matches basic SQL SELECT statements ending with a semicolon, allowing case-insensitive 'SELECT' and 'FROM' keywords. Captures column names (or * for all columns) and table names composed of alphanumeric characters, hyphens, and underscores, with optional commas and a catch-all for trailing clauses like WHERE or ORDER BY. Useful for validating or extracting simple SQL queries from logs, code, or user input. Note that character classes like [s|S] mistakenly include the pipe character as a literal match.