HTML::TokeParser::Simple : is't suitable for me ??

Discussion in 'Perl Misc' started by jussi, Oct 7, 2005.

  1. jussi

    jussi Guest

    Hi gurus


    I need to modify HTML page by finding and replaicing some strings. Here
    is few exsamples what I need to do (inside FORM tags):

    !!more html code in the same line !! <a
    href="javascript:CreateList(TopForm)"><img
    src="images/playselected.gif" bgcolor="#949494" align="right/"
    border="0"></a> !!more html code in the same line !!

    This should replace with this one:
    &nbsp;

    And more I need to find and replace:

    <a
    href="javascript:popUpPlayFile('./PlayFile.asp?E:\\video\\506-TEST-VIDEO.mpg@$$@506-SRI%TEST_VIDEO',1)">

    should be like this:

    <a href="file://server/mpegs/506-TEST-VIDEO.mpg>

    I have tryit regular expressions to manage with this, but its very
    hard.

    Any help would be nice.

    -Jussi
    jussi, Oct 7, 2005
    #1
    1. Advertising

  2. "jussi" <> writes:

    > I need to modify HTML page by finding and replaicing some strings.


    ....

    > I have tryit regular expressions to manage with this, but its very
    > hard.


    Yes it is, which is why the FAQ says not to do it that way:

    perldoc -q html

    The first question deals primarily with removing all the markup and leaving
    just plain text, but the point it makes about using regexes vs. using a
    parser module is just as valid for what you're doing.

    sherm--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
    Sherm Pendley, Oct 7, 2005
    #2
    1. Advertising

  3. jussi

    jussi Guest

    Re: HTML::TokeParser::Simple : is't suitable for me ??

    Could you please give an code exsample how to manage my problem. I have
    read the doc, but couldn't get it work.

    Thansk advance
    -Jussi
    jussi, Oct 7, 2005
    #3
  4. Re: HTML::TokeParser::Simple : is't suitable for me ??

    "jussi" <> writes:

    > Could you please give an code exsample how to manage my problem.


    What problem would that be? I'm not psychic, and you didn't bother to quote
    any of the relevant conversation, so I have no idea.

    > I have read the doc, but couldn't get it work.


    "It doesn't work" is about the most vague, useless problem description you
    could possibly give. What code did you try? What were you expecting it to
    do, and what did it do instead?

    Have you read the posting guidelines for this group yet?

    sherm--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
    Sherm Pendley, Oct 7, 2005
    #4
    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. Patrick Joly
    Replies:
    0
    Views:
    78
    Patrick Joly
    Feb 25, 2004
  2. Maqo
    Replies:
    4
    Views:
    128
    A. Sinan Unur
    Feb 23, 2005
  3. DVH

    HTML::TokeParser

    DVH, Oct 16, 2005, in forum: Perl Misc
    Replies:
    8
    Views:
    96
    A. Sinan Unur
    Oct 19, 2005
  4. Abram

    HTML::TokeParser & TableExtract

    Abram, Apr 25, 2006, in forum: Perl Misc
    Replies:
    16
    Views:
    204
    David Combs
    May 22, 2006
  5. -did-not-set--mail-host-address

    HTML::TokeParser; __DATA__ as a filehandle

    -did-not-set--mail-host-address, Oct 24, 2006, in forum: Perl Misc
    Replies:
    2
    Views:
    119
    Brian Wilkins
    Oct 24, 2006
Loading...

Share This Page