Script running numerous files through another script

Ken Elliott's picture

They have: 358 posts

Joined: Jun 1999

I partially understand regular expressions. But I am having trouble trying to figure out how to pull the email address out of a html page and print it, if it's not on a line by itself.

I didn't clean up my code with \n's.
Is there a way to find stuff inbetween two tags?
Like between & ?

Lemme know if you need me to paint it clearer.
Thanx for the help.

VulKen
Built Like A Swiss...Car

Sorry couldn't edit the Subject Line I guess...

[Edited by VulKen on 08-22-2000 at 11:29 PM]

Pimpin like a pimp with an electrofied pimpin machine!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

try something like this:

open(FILE, "your.html");
$ThePage = join("", <FILE>);
close(FILE);

$ThePage =~ /\b(.*)\@(.*)\.(.*)\b/;
$TheEmail = "$1\@$2.$3";

print $TheEmail;
'

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.