Extract content from a HTML or text file

Discussion in 'Perl Misc' started by frozensnow, Nov 1, 2006.

  1. frozensnow

    frozensnow Guest

    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
     
    frozensnow, Nov 1, 2006
    #1
    1. Advertising

  2. frozensnow

    Guest

    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.

    frozensnow wrote:
    > 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
     
    , Nov 1, 2006
    #2
    1. Advertising

  3. frozensnow

    John Bokma Guest

    "frozensnow" <> wrote:

    > 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.

    --
    John Experienced Perl programmer: http://castleamber.com/

    Perl help, tutorials, and examples: http://johnbokma.com/perl/
     
    John Bokma, Nov 1, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TheKeith
    Replies:
    20
    Views:
    106,959
    Chris Morris
    Oct 29, 2003
  2. mark4

    Extract Content from HTML ?

    mark4, Feb 28, 2005, in forum: HTML
    Replies:
    10
    Views:
    14,865
    mbstevens
    Mar 1, 2005
  3. hazz
    Replies:
    6
    Views:
    49,820
    SkyUCHC
    Jun 9, 2010
  4. Replies:
    0
    Views:
    346
  5. AMT2K5
    Replies:
    1
    Views:
    156
    Gunnar Hjalmarsson
    Nov 23, 2005
Loading...

Share This Page