agoth has asked for the wisdom of the Perl Monks concerning the following question:
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"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex question (new)
by kilinrax (Deacon) on Nov 10, 2000 at 21:21 UTC | |
|
(Ovid) Re: regex question (new)
by Ovid (Cardinal) on Nov 10, 2000 at 21:23 UTC | |
by agoth (Chaplain) on Nov 10, 2000 at 21:31 UTC | |
|
RE: regex question (new)
by KM (Priest) on Nov 10, 2000 at 22:35 UTC | |
|
Re: regex question (new)
by mirod (Canon) on Nov 10, 2000 at 21:29 UTC |