Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: RegEx to find the index of the character '@' in an Email address

by almut (Canon)
on Jul 26, 2010 at 15:25 UTC ( #851388=note: print w/ replies, xml ) Need Help??


in reply to RegEx to find the index of the character '@' in an Email address

...will work only if the given string $mail = "abcdefgh\@gmail.com"; But in my case, i will be getting the input with email address as its. Not with an escape character.

The backslash is only needed to prevent the interpolation of an array @gmail in the double quoted string literal.  The actual value in $mail won't hold the backslash, just as the input values you're expecting to handle...

That said, maybe have a look at Email::Address.


Comment on Re: RegEx to find the index of the character '@' in an Email address
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-07-28 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls