Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #22631

Removing ' ' from strings ??

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" <med_cutout_syntel@aol.com>
Newsgroups comp.lang.javascript
Subject Removing '&nbsp;' from strings ??
Date Wed, 15 Jan 2014 15:23:56 -0700
Lines 30
Message-ID <bjog40Fe7h5U1@mid.individual.net> (permalink)
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

Show key headers only | View raw


Hi:

    I'm probably having a senior moment, but with IE8 as a test bed, I 
cannot seem to replace '&nbsp;' with an ordinary space character.

    e.g.,

    Let's say my input text string is:

        var mytext = "&nbsp;&nbsp;" + "Hello" + "&nbsp;" + "World" + 
"&nbsp;"

    Using IE8:

        var newtext = mytext.replace("&nbsp;"," ") ;

    The above statement*works* in Chrome (i.e., it replaces '&nbsp;' with an 
'ordinary' space character

    But, in IE8 , these '&nbsp;' 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

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-15 15:23 -0700
  Re: Removing '&nbsp;' from strings ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-01-15 23:35 +0100
    Re: Removing '&nbsp;' from strings ?? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-15 23:44 +0000
      Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-15 17:07 -0700
        Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 09:08 -0700
          Re: Removing '&nbsp;' from strings ?? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-16 16:18 +0000
            Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 10:23 -0700
              Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 10:35 -0700
                Re: Removing '&nbsp;' from strings ?? Martin Honnen <mahotrash@yahoo.de> - 2014-01-16 18:58 +0100
                Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 11:05 -0700
                Re: Removing '&nbsp;' from strings ?? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-16 18:01 +0000
                Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 11:10 -0700
                Re: Removing '&nbsp;' from strings ?? Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-16 19:17 +0000
                Re: Removing '&nbsp;' from strings ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-01-16 13:37 -0700

csiph-web