Don't ask to ask, just ask | |
PerlMonks |
Re^3: Help with regular expressionby graff (Chancellor) |
on Nov 13, 2014 at 02:26 UTC ( [id://1107044]=note: print w/replies, xml ) | Need Help?? |
toolic's solution is the right answer for the few examples you gave, but since you haven't said anything about the larger context of strings you might be getting as input, how should the following be treated by your intended regex?
All the above would fail, given toolic's very tight use of anchors (^ and $). If that's what you want, then the problem is solved.
In Section
Seekers of Perl Wisdom
|
|