Extract content from a HTML or text file

F

frozensnow

hello everyone,

I need to extract content between two form tags.
I tried doing regular expression but its not effective as the HTML is
not formatted.
I saw many articles suggesting about the HTML::parser but could not
find it in the active perl repository.
I was not able to figure out how the HTML::parser works.
Can any one let me know if they know any solution for this problem or
how HTML::parser works?

Thank you in advance
 
C

cgrady357

Add http://www.bribes.org/perl/ppm to your ppm repositories. It has
the module compiled for ActiveState users.

Another option is to install the Strawberry perl distribution. This
includes the MinGW compiler, so you can compile your own modules as
needed. Then you could run:
perl -MCPAN -e "install HTML::parser" from your command line.
 
J

John Bokma

frozensnow said:
hello everyone,

I need to extract content between two form tags.
I tried doing regular expression but its not effective as the HTML is
not formatted.
I saw many articles suggesting about the HTML::parser but could not
find it in the active perl repository.
I was not able to figure out how the HTML::parser works.
Can any one let me know if they know any solution for this problem or
how HTML::parser works?

I recommend to use HTML::TreeBuilder, see http://johnbokma.com/perl/
for several examples.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top