Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Keep It Simple, Stupid
 
PerlMonks  

Re: @ in regex, or not?

by Daddio (Chaplain)
on Mar 27, 2001 at 03:27 UTC ( [id://67426]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to @ in regex, or not?

While not being quite as restrictive as some of the examples above, this should give you good, basic 'a@b'-type email address checking:

if ($entry =~ /[^\@]+\@[^\@]+/) {

Add more characters to the negated classes to make it more restrictive, or leave it as is for the basic check.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://67426]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.