Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: Removing ' ' from strings ?? Date: Wed, 15 Jan 2014 15:23:56 -0700 Lines: 30 Message-ID: X-Trace: individual.net 2L6BYjugD+ryAVJDkPu25gQW+i1WAg2sUMY3AUtsrOAeMX/N6C Cancel-Lock: sha1:Qh/1rzdjCgPESK75EhMsuFXlF1c= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.javascript:22631 Hi: I'm probably having a senior moment, but with IE8 as a test bed, I cannot seem to replace ' ' with an ordinary space character. e.g., Let's say my input text string is: var mytext = "  " + "Hello" + " " + "World" + " " Using IE8: var newtext = mytext.replace(" "," ") ; The above statement*works* in Chrome (i.e., it replaces ' ' with an 'ordinary' space character But, in IE8 , these ' ' sequences are *not* replaced -- just ignored ?? I need a 'kick-in-the-butt' please -- perhaps a real regex string that would work in all cases ? Thank you. -Mel Smith