From: "Morris, Chris" Date: 2002-05-03T04:25:56+09:00 Subject: RE: regexp help: contains only one tag > Well, /.*<.*>.*/ obviously matches your last test, so of > course that's > going to fail! =) Yeah, I know ... I just couldn't get anything else to work... > Try something like this instead: > > re = /^[^<]*<[^<>]*>[^>]$/ Ah ... I was heading in this direction but forgot that in order to negate a character set the ^ goes *inside* the brackets. Yours works, with one tweak: /^[^<]*<[^<>]*>[^>]$/ /^[^<]*<[^<>]*>[^>]*$/ <= add * before $ Thanks! Chris