PetaMem has asked for the wisdom of the Perl Monks concerning the following question:
I wonder if there is a way to validate a regexp in Perl. It'd need just a YES/NO functionality. Let's say you have something like a[hjg].* and *a[hj. The routine (my guess is that this could even be another regexp), should identify the first regexp as valid, the second as invalid.
I've been peeking around in the monastery, but only found references to the much bigger (if not impossible) task of validating perl code. But it seems to me, that a plain YES/NO regexp validation should be feasible.
Any clues? TIA
Bye
PetaMem
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Validating a Regexp
by broquaint (Abbot) on Jul 29, 2002 at 14:41 UTC | |
by Juerd (Abbot) on Jul 29, 2002 at 17:46 UTC |