Home >Web Front-end >JS Tutorial >The string replacement function replace() method in javascript is a little different from c# and vb replacement_javascript skills
1.
Result: Only the first character a of the string is replaced. This is not the result I want↓
2.replace() supports regular expressions, it can be as follows Regular expression rules match characters or strings and then give replacement!