in reply to Counting HTML form elements with a regular expression

I see that what you're really asking for is the regular expression(s) needed to do this task.

It would help if you posted your 'hideously ugly' regex code so that we could have a look at what you've already done. That would also help to illustrate the issue you are having with attributes.

Since your objective is to use this with PHP you also probably should have marked this as an Off Topic thread. I do not personally know the differences in syntax that might exist between PHP & Perl with regard to regex. Are there any? That would certainly effect any conversations we might have on this topic.



Wait! This isn't a Parachute, this is a Backpack!
  • Comment on Re: Counting HTML form elements with a regular expression