I want to replace multiple characters in a string using regex. I am trying to swap letters A and T as well as G and C.
function replacer(string) {
return "String " + string + " is " + string.replace(/A|T|G|C/g, "A","T","G","C");
}
do I have the regex expression correct?
thanks