in reply to Re: How to strip everything in a string except HTML Link
in thread How to strip everything in a string except HTML Link

More specifically, the links are all just news affiliate webites, like newsok.com, etc. I have no idea which news affiliate websites they will be, but there are hundreds of them. He changes some of them regularly, so I am building this to check on them once per day, to pick up any new ones and add them to our database.

My friend that does that said to check it daily, so I am just writing a script to go do that. The part I'm having a problem with is getting the full html link, I've been using strip and striping down every part, but that is just too much, I know there is an expr that will work. I just cannot recall how to write it.

Rich
  • Comment on Re^2: How to strip everything in a string except HTML Link

Replies are listed 'Best First'.
Re^3: How to strip everything in a string except HTML Link
by Corion (Patriarch) on May 15, 2015 at 07:33 UTC

    Have you looked at the modules I linked? They will all happily extract the links.

    Alternatively, you might want to (re)read perlre, but I would use an existing HTML parser instead of trying my own.

      Yeah, I looked over them all, very complicated for me, since I've not been writing Perl scripts for over 3 years, so I've forgotten nearly everything, except simple code...

Re^3: How to strip everything in a string except HTML Link
by Anonymous Monk on May 15, 2015 at 07:46 UTC
    I did not mean expr, I meant a regex...