|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Validating a Regexpby PetaMem (Priest) |
| on Jul 29, 2002 at 10:35 UTC ( [id://185993]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.PetaMem has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monks, 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
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||