Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Allow empty form fields regexby matija (Priest) |
on Mar 18, 2004 at 16:12 UTC ( [id://337719]=note: print w/replies, xml ) | Need Help?? |
Well, at first I wanted to say you only need to add a |(^$) to your regexp, but some experimentation has showed me that doesn't work. Then I took a good look at you regexp. You are accepting any of a class of characters, one or more times. To accept an empty field as well, simply change the + to *: It's not a general answer, but in your particular case, it should work.
In Section
Seekers of Perl Wisdom
|
|