|Perl Monk, Perl Meditation|
Validating a Regexpby PetaMem (Priest)
|on Jul 29, 2002 at 14:35 UTC||Need Help??|
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