Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: vallidating a regular expressionby reasonablekeith (Deacon) |
on May 11, 2006 at 09:07 UTC ( [id://548643]=note: print w/replies, xml ) | Need Help?? |
Your question is a perfect example of why you should provide a working example when asking questions on SOPW I'm assuming you're doing something like this... If that assumption is correct, then as already mentioned, your single digit numbers are not passing your regex because you've mandated that there must be two characters. this is a simple fix to the regex, combined with getting rid of your nested if statement you get the following. but without knowing exactly what your data was, it's hard to say if this is right for you.
--- my name's not Keith, and I'm not reasonable.
In Section
Seekers of Perl Wisdom
|
|