in reply to A Quick Regex Question
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A Quick Regex Question
by Nkuvu (Priest) on Oct 09, 2006 at 21:46 UTC |