mce has asked for the wisdom of the Perl Monks concerning the following question:
This question might have been asked a million times, but here it is.
I want a regex to fail if there is:
1. A character not in the set
2. A character twice in the set
f.e.
The list of characters 'ABCDEF', than it should return false if.
ABDA
ABXD
AABB
But true if
ABC
A
DEFA
I now worked around with a map or grep, but I think it should be doable in a single regex. The sequence of characters doesn't matter
Thanks for your help
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex maching unique character set
by Corion (Patriarch) on Jan 30, 2003 at 11:31 UTC | |
|
Re: regex maching unique character set
by broquaint (Abbot) on Jan 30, 2003 at 11:35 UTC |