Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: REgular expression to check the string that allows "a","b" and "c" to occur only once in any order.by bart (Canon) |
on Dec 11, 2007 at 13:25 UTC ( [id://656399]=note: print w/replies, xml ) | Need Help?? |
This looks like overkill.
If a string is required to contain all of an "a", a "b" and a "c" and its length is limited to 3, then it can only contain one of each. So this ought to suffice:
Of course, yours is the way to go if the length is not limited to 3.
In Section
Seekers of Perl Wisdom
|
|