I am boggled by regex I think I'm dyslexic when it comes to these horrible bits of code.. anyway, there must be an easier way to do this- (ie. list a set of replace instances in one line), anyone? Thanks in advance.
function clean(string) {
string = string.replace(/\@~rb~@/g, '').replace(/}/g, '@~rb~@');
string = string.replace(/\@~lb~@/g, '').replace(/{/g, '@~lb~@');
string = string.replace(/\@~qu~@/g, '').replace(/\"/g, '@~qu~@');
string = string.replace(/\@~cn~@/g, '').replace(/\:/g, '@~cn~@');
string = string.replace(/\@-cm-@/g, '').replace(/\,/g, '@-cm-@');
return string;
}