Find a line in an html file

Discussion in 'Perl Misc' started by starfrit@gmail.com, Jul 13, 2006.

  1. Guest

    I'm trying to addapt a perl script with another version of my hockey
    simulator, because the file name structure as changed. It is an IF
    that looks for a link into an html file

    Before, the link was
    <A HREF=AHSQ79.html> and the perl line was if (m/^<A
    HREF.(\w*.\w+)>.(\d+).*/)

    Now, the link is <a href="AHSQ2006-79.html">

    Thanks for any help
    , Jul 13, 2006
    #1
    1. Advertising

  2. Xicheng Jia Guest

    wrote:
    > I'm trying to addapt a perl script with another version of my hockey
    > simulator, because the file name structure as changed. It is an IF
    > that looks for a link into an html file
    >
    > Before, the link was
    > <A HREF=AHSQ79.html> and the perl line was if (m/^<A
    > HREF.(\w*.\w+)>.(\d+).*/)
    >
    > Now, the link is <a href="AHSQ2006-79.html">
    >
    > Thanks for any help


    if (/^<a href="([^"]*)">.(\d+)/i) { ... }

    Xicheng
    Xicheng Jia, Jul 13, 2006
    #2
    1. Advertising

  3. starfrit Guest

    Xicheng Jia wrote:
    > wrote:
    > > I'm trying to addapt a perl script with another version of my hockey
    > > simulator, because the file name structure as changed. It is an IF
    > > that looks for a link into an html file
    > >
    > > Before, the link was
    > > <A HREF=AHSQ79.html> and the perl line was if (m/^<A
    > > HREF.(\w*.\w+)>.(\d+).*/)
    > >
    > > Now, the link is <a href="AHSQ2006-79.html">
    > >
    > > Thanks for any help

    >
    > if (/^<a href="([^"]*)">.(\d+)/i) { ... }
    >
    > Xicheng


    It works, thanks
    starfrit, Jul 13, 2006
    #3
  4. <> wrote:

    > I'm trying to addapt a perl script



    You forgot to post the adaptations that you have tried.

    If you show us your broken attempt, we can probably help you fix it.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Jul 13, 2006
    #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. Hugo
    Replies:
    10
    Views:
    1,303
    Matt Humphrey
    Oct 18, 2004
  2. kaushikshome
    Replies:
    4
    Views:
    762
    kaushikshome
    Sep 10, 2006
  3. scad
    Replies:
    23
    Views:
    1,161
    Alf P. Steinbach
    May 17, 2009
  4. Wybo Dekker
    Replies:
    1
    Views:
    352
    Yukihiro Matsumoto
    Nov 15, 2005
  5. Marek Stepanek
    Replies:
    12
    Views:
    411
    Peter J. Holzer
    Sep 2, 2006
Loading...

Share This Page