1. replace() 함수로 모두 바꾸기

"abab".replace(/a/g, "C");
// => "CbCb"

2. 대소문자 관계없이 찾아서 모두 바꾸기

"abAb".replace(/a/gi, "C")
// => "CbCb"