To match a sequence of "p"'s, "e"'s, "r"'s and "l"'s, you can use a character class,
You are capturing the last matched character with those parens. Is that what you mean to do? If you want to capture the whole string, the parens should contain the '+'.while (<>) { print if m/[perl]+/; }
After Compline,
Zaxo
In reply to Re: A Quick Regex Question
by Zaxo
in thread A Quick Regex Question
by chinamox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |