in reply to Re: Regex Nested Matching
in thread Regex Nested Matching

Well, this code won't be around for long. I have three complex static html and javascript files I need to parse, stick in the DB and then be done with them (forever). But, I am looking into HTML parsers on CPAN to make this task a little easier. Thanks!

Replies are listed 'Best First'.
Re^3: Regex Nested Matching
by SuicideJunkie (Vicar) on Feb 25, 2010 at 14:41 UTC

    If it is a single-use script, then that is all the more reason to keep it simple.

    Why try to get creative and write an Obfu regex when you just need to get the job done and then throw it away? Lay it out, don't worry about compactness and just make sure that the code will obviously do what you want it to. (Throwing pre-written HTML parsing modules at it is even better)

    After all, you're going to spend far more time thinking about edge cases and correctness than you will spend typing the code!