From: Thomas Hurst Date: 2002-05-18T01:17:04+09:00 Subject: Re: Greedy Regexp * Kontra, Gergely (kgergely@mlabdial.hit.bme.hu) wrote: > Consider > > Evil </TR> > > Um, isn't that just a bit invalid? Evil </tr> &, < and > do not cease being special when inside an attribute (which also means when you link something containing an &, you should put it as &, not a naked &). Anyway, a more realistic example is:
Another cell
Or if you're trying to rip out quotes: He said She said They said no, which was nice. Where you get "He said She said They Saidno" if you just match .*?. Regexp's are best used in situations like this to scan to the next tag; leaving all the processing up to regexp is rather beyond it's capabilities. This is, of course, one reason to start using XHTML :) -- Thomas 'Freaky' Hurst - freaky@aagh.net - http://www.aagh.net/ - Truthful, adj.: Dumb and illiterate. -- Ambrose Bierce, "The Devil's Dictionary"