Use replaceAll
instead of RegExp with global flag
#3856
Merged
replaceAll
instead of RegExp with global flag
#3856