Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: REgular expression to check the string that allows "a","b" and "c" to occur only once in any order.by KurtSchwind (Chaplain) |
on Dec 11, 2007 at 05:43 UTC ( [id://656319]=note: print w/replies, xml ) | Need Help?? |
Update: Nicely re-worked. Previously it didn't work but now it does. Nice job. I'm leaving my initial response here anyway, but it's no longer pertinent. That doesn't work because it incorrectly matches invalid strings. If you change to You'll still get a match even though that's not supposed to be a valid string. You'll have to go a bit more complicated in the regex to exclude the false hits. Update: I was missing my 2nd code snip.
-- I used to drive a Heisenbergmobile, but every time I looked at the speedometer, I got lost.
In Section
Seekers of Perl Wisdom
|
|