Basically that means some word followd by a '_' and '-'.
Well actually no it doesn't, see perlintro#More complex regular expressions
item 8. matches a single character in the given set, so it matches a single word character or dash, but only one character
if you want to match it more than once, you have to use a quantifier like item 1 or item 2 from the quantifier list; or the second Quantifiers list in perlre
So you might write
m{^Users of (.+?): \(Total of (.+?) licenses issued; Total of (.+?) li +cense in use\)$}im m{^Users of ([^:]*): \(Total of (.+?) licenses issued; Total of (.+?) +license in use\)$}im m{^Users of ([^:]+): \(Total of (\d+) licenses issued; Total of (\d+) +license in use\)$}im m{^Users of ([\w\_\-]+): \(Total of (\d+) licenses issued; Total of (\ +d+) license in use\)$}im m{^Users of ([\w\_\-]+): \(Total of (\d+) licenses issued; Total of (\ +d+)}im
Modern Perl ch 6 is also an introduction to regex
In reply to Re^5: regular expression not matching
by Anonymous Monk
in thread regular expression not matching
by ghosh123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |