Subj : Regexp Bug? To : netscape.public.mozilla.jseng From : gavin Date : Fri Feb 18 2005 01:03 pm I might be wrong about this, but I think this is a bug in the regexp matcher: Given: var theCode = "foo.bar.x = jim.jam * 15 - whee"; var theIDMatch = /(?!\.)\b[a-z_]\w*\b/g; var theIDs = theCode.match( theIDMatch ); I get theIDs as: [foo,bar,x,jim,jam,whee] Shouldn't the negative lookahead for the period prevent 'bar', 'x' and 'jam' from appearing the results? Or am I a fool who has misunderstood how negative lookaheads should work with word boundaries? .