[thelist] Regexs and headaches

Dan Parry dan at virtuawebtech.co.uk
Thu Feb 9 06:28:46 CST 2006

Hi all


I have a regex problem that is giving me major hassles. the preamble is that
the expression looks for opening HTML tags in a textarea value


I've successfully got it to locate all opening tags and ignore self-closers
(eg <br/>). it even picks up tags with attributes


But (and this is a big but) it can't find single letter tags (eg <b>). it
can find single letter tags with attributes though (eg <a
href="http://example.org <http://example.org/> ">)


Here is the regex:




Anyone have any ideas?  The app it's working in is at


I usually work on things until I figure them out rather than ask, but this
one has me beat


TIA :-)





Dan Parry

Senior Developer

Virtua Webtech Ltd



More information about the thelist mailing list