in reply to Counting HTML form elements with a regular expression

Ah, may already know about why you shouldn't be trying to parse html in regexes, and that you should be having a look at HTML::TokeParser::Simple.

Except you need this done in php. Well, I believe there is a way to call perl from php, though it may be a bit of a pain. (See also just plain google on that.) I would just do that. This html from regex stuff is such a pain that I would do that, call perl from php and use a module.

If it has to be regexes, no perl, post some sample input data so the monks can have a shot at it without having to create their own test data. Good luck!

  • Comment on Re: Counting HTML form elements with a regular expression