Test, validate and match regular expressions
Splits command-line style input into individual arguments, matching two forms: quoted tokens (wrapped in double, single, or backtick quotes, captured in the 'arg' group) and unquoted whitespace-delimited tokens (captured in 'arg_'). It supports backslash escapes within arguments, consumes trailing whitespace, and uses a lookahead to ensure proper token boundaries. With global/multiline flags, it's ideal for tokenizing shell commands into argv-style arrays.