What is keeping you from including the closing tag in your regex? Hoping that Tidy (who actually did that) will guess the correct end tag can lead to quite unexpected results.
Sure, the regex might become a little more complex, but it will give better predictable results.
|