Agreed, though there's no current requirement to support escaping in the quoted strings. But that's exactly the sort of reason I'm unhappy about the duplicated regexp chunks, since it'd be easy to enhance one of the ' ([^']*) ' fragments and miss the other.
Similarly, I could collapse the single- and double-quoted string checks with a style like (["']) (.*?) \1, but that can make tracking the capture numbers even harder, since now a change in the regexp would mean updating the numbering elsewhere in the pattern as well as in the push @args, ... code.
HugoIn reply to Re: Re: Parsing arguments
by hv
in thread Parsing arguments
by hv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |