Test, validate and match regular expressions
Matches if/while statements in source code along with their parenthesized conditions, using PCRE recursion ((?2)) to handle nested balanced parentheses, e.g. if((a+b)>c). The 'if' keyword must appear at the start of a line or after a space, semicolon, closing brace, or newline, while 'while' matches anywhere. Useful for code parsing, syntax highlighting, or static analysis of C-style languages.