I tried this : Replace multiple strings at once And this : javascript replace globally with array how ever they are not working.
Can I do similar to this (its PHP):
$a = array('a','o','e');
$b = array('1','2','3');
str_replace($a,$b,'stackoverflow');
This result will be :
st1ck2v3rfl2w
I want to use regex at the same time. How can I do that ? Thank you.