How to extract emails address from a string using perl and to put the email addres into a variable? My strings looks like
Ben Tailor <[email protected]>
[email protected], [email protected], Ben Tailor <[email protected]>
I tryed this
$string ="Ben Tailor <[email protected]>";
$string =~ /\b([^\s]+@[^\s]+)\b/g ;
print $string;
And the Out put xas:
Ben Tailor <[email protected]>
Someone have an Idea?
Fixed using
Email::Valid->address($string);
Thx