Yeah, correct, for support for the hex codes:...
code:
strMyNewPSM = strMyNewPSM.replace(/\[c=([1-4]?\d|5[0-4]|#[0-9A-F]{6})\]/gi, "·\$$$1")
strMyNewPSM = strMyNewPSM.replace(/\[\/c\]/gi, "·\$");
strMyNewPSM = strMyNewPSM.replace(/^\s+/g, "");
-edit- I just found out, that the 'c' in the tag is case sensitive, only lowercase is allowed and also the numbers go 'til 69
, therefore this would be a better solution
code:
strMyNewPSM = strMyNewPSM.replace(/\[c=([1-6]?\d|#[0-9A-Fa-f]{6})\]/g, "·\$$$1")
strMyNewPSM = strMyNewPSM.replace(/\[\/c\]/g, "·\$");
strMyNewPSM = strMyNewPSM.replace(/^\s+/g, "");