AlexTekTip
Programmer
I need to parse through a html source formatted document looking for e-mail addresses. The html is ugly and one line can have more then one e-mail address.
How do I get the program to print out every match one one line? Currently it only prints out the first match it encounters and then goes onto the next line.
My source code is:
$efile = 'gbdirectory.txt';
open(E, $efile);
while (<E>) {
$test = $_;
while ($test =~ m/<a\shref="mailto\S+)?\"\>/) {
print "$1\n";
}
}
How do I get the program to print out every match one one line? Currently it only prints out the first match it encounters and then goes onto the next line.
My source code is:
$efile = 'gbdirectory.txt';
open(E, $efile);
while (<E>) {
$test = $_;
while ($test =~ m/<a\shref="mailto\S+)?\"\>/) {
print "$1\n";
}
}