- if (/^\s* # Initial spaces.
- (?:(-\w),\s+)? # $1: Possible short option.
- (--[-\w]+) # $2: Long option.
- (\[?) # $3: '[' iff the argument is optional.
- (?:=([-\w]+))? # $4: Possible argument name.
+ if (/^\s* # Initial spaces.
+ (?:(-\w),\s+)? # $1: $short: Possible short option.
+ (--[-\w]+) # $2: $long: Long option.
+ (\[?) # $3: $opt: '[' iff the argument is optional.
+ (?:=(\S+))? # $4: $arg: Possible argument name.
+ \s # Spaces.