in reply to Multiple Multiline Regexps?

...just like Grandma used to code. :)

FWIW, that's only HTML by analogy. All <li> elements are supposed to be children of <ul> or <ol> elements, which parent elements are not supposed to contain anything but <li> elements (though the latter can contain anything legal for other block-level elements).

I only mention this because if you start using more sophisticated HTML parsing modules (especially one that tries to build the document tree, if there is such a thing), the example markup could give them indigestion.

For more info, you might run your stuff through the validator.

BCE
--Your punctuation skills are insufficient!