Test, validate and match regular expressions
This regex matches command-line style arguments, specifically capturing option names preceded by '-' or '--' and optionally their values, which may be quoted strings or unquoted tokens. It is useful for parsing CLI input, extracting switches and associated parameters from a command string, and handling both short and long options with or without values.