regex replace vs replaceAll vs replace in loop V1.1 (version: 1)
replace all whitespaces from string.
what is faster? replace() with regex with global flag or without global flag and using a loop?
Comparing performance of:replace vs replaceAll vs replace in a loop without g flag vs replace in a loop, count matches with g flag, replace without g flag