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

$mail =~ /(.*?)\@/; my $first_part = $1; # better do some error-handling first ;-)

But better have a look at CPAN for some nice email handling/parsing modules...

HTH, Rata
  • Comment on Re: RegEx to find the index of the character '@' in an Email address
  • Download Code