in reply to Re^2: Find a specific word in a text file
in thread Find a specific word in a text file

davido has given you good advice. I would go further and say _don't_ parse HTML even in apparently straightforward cases.

There is often (always?) shed loads of arbitray white space which can easily defeat a regex. The HTML can be 'loose', 'strict' and change every day!

Once you've used HTML::TokeParser (if I can, anybody can!) you'll be able to reuse the code in any future apps.

Have a look at this tutorial. There is an example here. Search and Supersearch will find many more.

It does seem like a lot of trouble if you are in a hurry! But I assure you the effort will pay dividends.

Best of luck, wfsp

  • Comment on Re^3: Find a specific word in a text file

Replies are listed 'Best First'.
Re^4: Find a specific word in a text file
by algonquin (Sexton) on Sep 11, 2004 at 11:01 UTC
    Thanks. I did just that (I used tokeparser). It took a while but its worth it. Thx.