in reply to Re: Help with form validation regex
in thread Help with form validation regex

In your last code snippet I think the ... "_ear" eq substr $_, -3; is only going to look at the last three characters so the condition will never be true.

$ perl -le ' $str = q{bit_of_a_pigs_ear}; print q{_ear} eq substr( $str, -3 ) ? q{Match found} : q{No match}; print q{_ear} eq substr( $str, -4 ) ? q{Match found} : q{No match};' No match Match found

I hope this is of interest.

Cheers,

JohnGG