Hi, how do you remove white space? I have tried the following but with no success:
[CODE] var a = “he ll o o”;
function bla(){ if(a.match(/(s)/))alert(“Ok”); //works
a.replace(/(s)/,””); //does not work } [/CODE]
any help appreciated!
[CODE] function stripspaces(what){ return what.replace(/s+/g,''); } alert(stripspaces("he ll o o"));[/CODE]
[CODE] var a = "he ll o o"; a=a.replace(/(s)/g,"") alert(a) [/CODE]
Help @Laurence485 spread the word by sharing this article on Twitter...