use strict;
my $str = '"Maximilian Milde" <max.milde@freenet.de>,<Telefonkonferenz@telefonkonferenz.de>, "Model Woman, Petra" <muster114@googlemail.com>, \'Sample Lady, Eva\' <eva.muda@gmx.net>, "\'Sample Man, Bernhard\'" <Mustermann.bernhard@t-online.de>, "\'Sample Woman, Ute\'" <utemusterfrau@gmail.com>, "\'Sample, Gisela\'" <Giselamuster50@gmx.de>, \'Mumann, Helmut\' <hemumann@googlemail.com>, "\'Mustermann, Alexander\'" <AlexanderMustermann@web.de>, "\'Muster, Vera\'" <v.muster@web.de>, "\'sample woman, Sandra"" <sandra.Musterfrau@gmx.net>, "\'Schubert, Ina"" <inas31@gmx.de, Seitz, Irmtraud, Irmtraud.s.e@googlemail.com, Kutz, Holger, Claudia Krüger, Milde, F... Mannheim';
my $regex = qr/(?:[A-Za-z0-9!#$%&'*+/=?.^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[x01-x08x0bx0cx0e-x1fx21x23-x5bx5d-x7f]|[x01-x09x0bx0cx0e-x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])).){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[x01-x08x0bx0cx0e-x1fx21-x5ax53-x7f]|[x01-x09x0bx0cx0e-x7f])+)])/mp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html