Regex test()
is giving me issues in Firefox and Chrome, yet it works flawlessly in Opera and Safari.
troubled code:
var pattern = /(\s+(?!\$\w+)|(^(?!\$\w+)))/g;
if(pattern.test(String(id).replace(/\s+OR|AND\s+/g, ''))) {
searchError("You suck.");
return 1;
}
When you pass in white space, it blocks it every time. When you pass in something like '$a b'
then it will work every other time in Firefox/Chrome. WEIRD.