February 5th, 2009, 10:01 AM
Matching a <div> without another div inside it
I'm working on HTML (I can't control it so can't parse it as XML as it wont always be valid) .
I want to match (for example) any div that does not have another div inside it:
(the bold parts here)
on strings up to around 5000 chars, then appears to cause php to crash. It also seems overy complicated for what i'm trying to do.
Is there another easier way?
February 5th, 2009, 11:46 AM
This may perform better: