Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Regex being stupid

by boftx (Deacon)
on Sep 19, 2013 at 07:07 UTC ( [id://1054786]=note: print w/replies, xml ) Need Help??


in reply to Regex being stupid

I'm really too tired to take a crack at this (being awake only because of a roll-out that happened at 00:00) but if it can be guaranteed that the potential email address will always be the first element before a whitespace in a give input line then you might try this:

my ($email,$foo) = split(/\s/,$text,2);

You could then use any number of tools to see if $email is actually a potentially reasonable representation of an email address.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-03-28 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found