Regular how to remove the left and right spaces of specified characters in a string

for example: "aa A1:B2 v2VR b3"
want to get: "aa A1:B2 v2VR b3"


var str = 'aa A1: B2 v2 : b3';
var reg = /(\s*:\s*)+/gi;
var newstr = str.replace(reg, ':');
console.log(newstr);

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e449c8-44abc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e449c8-44abc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?