Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: form validation

by plaid (Chaplain)
on May 10, 2000 at 06:08 UTC ( #10861=note: print w/replies, xml ) Need Help??


in reply to form validation

Your regular expression seems to work fine.. it's kind of hard to read, but I assume the regular expression is supposed to be
/[^a-zA-Z0-9_]/
First off, you don't need to negate the return value of the regular expression.. it's fine as it is. The only suggestion I could give would be that you might instead want to simplify by saying:
/[^\w]/
As the \w metacharacter is equal to exactly a-zA-Z0-9_. To simplify further:
/\W/
As \W is the opposite of \w

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2022-05-16 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (63 votes). Check out past polls.

    Notices?