The regex above will capture trailing spaces in the $1 variable ([A-Za-z\s]*). It's probably easier to just get rid of them after the match, with $match[0] =~ s/\s+$//; otherwise you'll need a fancier regex :-)
In reply to Re^2: Capture groups
by wardy3
in thread Capture groups
by legend
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |