Answers for "nodejs regex replace"

3

javascript regex replace

const search = 'duck'
const replaceWith = 'goose';

const result = 'duck duck go'.replaceAll(search, replaceWith);

result; // => 'goose goose go'
Posted by: Guest on June-23-2020
1

javascript replaceall

//as of August 2020, not supported on older browsers
str.replaceAll("abc","def")
Posted by: Guest on October-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language