in reply to Re^2: How regex works in array mode?
in thread How regex works in array mode?
How will I get rid all the capturing parens?An easy way, one that should also speed up your pattern, make it more understandable, and saves typing, is to replace
with([0-9]{3}|[0-9]{2}|[0-9]{1})
Of course, you could also use the Regexp::Common module: but be aware, unlike your pattern, the one in Regexp::Common rejects invalid IP addresses.[0-9]{1,3}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How regex works in array mode?
by astronogun (Sexton) on Apr 26, 2012 at 09:12 UTC | |
by JavaFan (Canon) on Apr 26, 2012 at 10:02 UTC |