I am trying to change CSS properties like this one.
-moz-border-radius
To the JavaScript CSS property like so.
MozBorderRadius
You need to pass a callback function instead of a string.
For example:
var exp = /-([a-z])/gi; console.log('-moz-border-radius'.replace(exp, function(match, char, index, str) { return char.toUpperCase(); } ));