[thelist] JS RegExp error in IE 5

Aylard JA (James) jaylard at equilon.com
Wed May 10 15:07:52 2000


David Shadovitz wrote:
> The following line of JavaScript works fine in Netscape 4.7, 
> but yields
> an error in IE 5:
>    qString = qString.replace(/+/g," ");

	You need to escape your "plus" sign, e.g.:

qString = qString.replace(/\+/g," ") ;

	Theoretically, Netscape should have choked on your original
construction, too.

hth,
James Aylard
jaylard@equilon.com