JavaScript/jQuery removing character 160 from a node's text() value - Regex
Posted
by tyndall
on Stack Overflow
See other posts from Stack Overflow
or by tyndall
Published on 2010-04-15T16:04:33Z
Indexed on
2010/04/15
16:13 UTC
Read the original article
Hit count: 136
$('#customerAddress').text().replace(/\xA0/,"").replace(/\s+/," ");
Going after the value in a span (id=customerAddress) and I'd like to reduce all sections of whitespace to a single whitespace. The /\s+/ whould work except this app gets some character 160's between street address and state/zip What is a better way to write this? this does not currently work.
© Stack Overflow or respective owner