var string="removespace : dont remove spaces";

need a regex which replaces all spaces before and after colon ':' .

above variable must be returned as

"removespacedont remove spaces"