Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: simple regex for names or last names

by Grygonos (Chaplain)
on May 03, 2005 at 12:58 UTC ( [id://453561]=note: print w/replies, xml ) Need Help??


in reply to simple regex for names or last names

I just recently spent a lot of time doing this without the lingua module. I can tell the most important thing you can do is to know your data format. If you post your data format I can help you come up with a few things probably.

  • Comment on Re: simple regex for names or last names

Replies are listed 'Best First'.
Re: simple regex for names or last names
by perleager (Pilgrim) on May 04, 2005 at 02:19 UTC
    Hello,

    I'm not sure, but is this question just asking to allow a field with aphabetical characters along with a - and . ?

    Of course like davidrw, a name can also contain a '.

    unless ( param('Company Name') =~ /^[\w.\'-]+$/) { print "Invalid characters in name. Only alphanumeric characters and + the following symbols . ' - _ are allowed."; }

    Thanks,
    perleager

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-25 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found