Q:

Removing colons and whitespace in one regular expression

I use the following to remove white space and :. 
For example ' e-post: ' becomes 'e-post'. 
replace(/\s/g,"").replace(/:/g,"");

But I know there is a better way to do it by using only one 'replace'. 
Could anyone help me please? 

A:

Simplest way - use alternation:
replace(/\s|:/g,"");

You can probably also use a character class:
replace(/[\s:]/g,"");

