Test, validate and match regular expressions
This regex extracts command-line flag definitions from help text output. It matches lines starting with whitespace, capturing an optional short flag (e.g., -l), an optional long flag (e.g., --long), an optional value or placeholder, and the descriptive text. It is useful for parsing --help output in bash scripts or building autocomplete tools.