d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Perl Help
Add Reply New Topic New Poll
Member
Posts: 22,878
Joined: Jun 30 2008
Gold: 1,065.00
Nov 28 2012 12:40pm
I cannot for the life of me figure out how to parse an Email Address out of a string using a RegEx.

I dont think I can use the Email::Address module, as it did not come with the perl version we were told to download, else this would be quite simple.
Member
Posts: 827
Joined: Jan 16 2012
Gold: 0.00
Warn: 10%
Nov 29 2012 07:19am
Parsing an email address is a tricky thing to achieve, no matter what language you're using. Try some popular regex sites like http://www.regular-expressions.info/, and some regex tester to check. The big problem is there are just too many formats of email to validate, so you'll want to tunnel it to be close to your scenario of email addresses.
Member
Posts: 22,878
Joined: Jun 30 2008
Gold: 1,065.00
Nov 29 2012 12:00pm
Quote (StormHasHe @ 29 Nov 2012 09:19)
Parsing an email address is a tricky thing to achieve, no matter what language you're using. Try some popular regex sites like http://www.regular-expressions.info/, and some regex tester to check. The big problem is there are just too many formats of email to validate, so you'll want to tunnel it to be close to your scenario of email addresses.


thanks

I ended up using /.+[\@].+[\.].+/

i know its not the prettiest of regex, but it got the job done :D
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll