Test, validate and match regular expressions
Identifies SAS program step boundaries by matching DATA steps, PROC steps, macro definitions (%macro), and include statements (%inc/%include). The regex anchors matches at the start of input or after a semicolon (SAS statement terminator), skips leading whitespace, and captures the step declaration text up to the next semicolon. Typically used in code editors for SAS syntax highlighting, code folding, or parsing program structure.