I ended up using two regex's where I'm sure one would be possible but cant find the combination required.
$data = 'any number of td/tds><td>stuff</td><td>email@email.com</td><t +d>more stfff</td><td>next@next.co.uk</td><td>r.h@a.com</td>'; my %addresses; @emails = ($data =~ /<td>(.*?\@.*?)<\/td>/g); for (@emails) { $_ =~ s/.*<td>(.*)?/$1/g; $addresses{$_} = 1; } } for (keys %addresses) { print "$_\n"; }
In reply to regex question (new) by agoth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |