Sean, did you ever figure out the greedy matching issue?
My problem is, suppose you have the following:
<form attributes="whatever"> word word etc. </form> blah <form attributes="whatever" > blah blah </form>
This regex is gonna get Everything:
'(<form)[>]>.(</form>)'
Now in English language I would say:
"Find <form , then attributes in the form, then a closing >, then anything EXCEPT A STRING </form>, and then a </form> string."
That would solve the greediness. I know how to exclude a single character, e.g. [a] excludes a, but I don't know how to exclude a STRING, i.e. this-- [(</form>)] -- DOESN'T WORK BECAUSE () LOSE THEIR POWER INSIDE THE [] BRACKETS.
I hope there is an answer to this issue and that I haven't outsmarted regular expressions already.
Sam Fullman