Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Tweak for my Perl Regex that screens for digits only

by mojotoad (Monsignor)
on Feb 05, 2006 at 16:25 UTC ( #528077=note: print w/replies, xml ) Need Help??


in reply to Tweak for my Perl Regex that screens for digits only

If the whole point of this exercise is to limit input into a form, why not provide separate fields for phone numbers vs extensions and limit each field to numbers only? That way you dodge the whole issue of spammers entering text, but allow the entry of extensions.

Cheers,
Matt

  • Comment on Re: Tweak for my Perl Regex that screens for digits only

Replies are listed 'Best First'.
Re^2: Tweak for my Perl Regex that screens for digits only
by hackermike (Novice) on Mar 04, 2006 at 22:08 UTC
    Thanks for your reply, I don't know why I was not notified, as I want to acknowledge contributions to query. Certainly you have a good point to use the form fields themselves to constrain input. One thing to consider is whether adding yet more fields to a form is OK, especially as a form gets ever more complex in the effort to get the data desired, and, whether the form designer would to prefer to NOT encourage more data to handle. Already form design has to consider separate fields for Last Name and First Name as well as 5 or 6 address fields, even when the data parts are not used separately as handling the zip 4/5 carrier route requires separate fields to get that right, or you got to allow for the hyphen, adn those that just HAVE TO enter two hyphens and then there are the spaces that seem to surround hyphens and copy n' paste which will pick up spaces and on and on. So I thought that, in this case, having one field that allowed for certain non digits would be an useful exercise to add another tool to the box. Thanks to all who have wrestled with this conumdrum, as it was less straighforward that I would have ever thought. Mike

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://528077]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2020-07-02 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?