P is for Practical | |
PerlMonks |
Re: RegEx to find the index of the character '@' in an Email addressby almut (Canon) |
on Jul 26, 2010 at 15:25 UTC ( [id://851388]=note: print w/replies, xml ) | Need Help?? |
...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.
In Section
Seekers of Perl Wisdom
|
|