Build, test, and debug regular expressions
Parses PostgreSQL log entries by matching lines starting with 'STATEMENT:' and capturing the SQL statement text into a named group, followed by optional 'ERROR:' and 'DETAIL:' lines with their messages captured in named groups. The multiline flag allows ^ to anchor at the start of each line, enabling extraction of multiple log entries in a single pass. Ideal for log analysis tools that need to extract SQL statements along with their associated error and detail messages from PostgreSQL server logs.