Build, test, and debug regular expressions
This regex is designed to parse AppleScript handler definitions, specifically capturing the handler name, parameters, inline comment, and subsequent block comment. It looks for lines starting with 'on' followed by a function-like syntax and expects a multiline block comment `(* ... *)` shortly after the declaration. Using global, multiline, and dotall flags, it is highly useful for extracting documentation and structural details from AppleScript source code.