Answers for "js replace all substrings"

1

js replace all substrings

/// replace "abc" with "" (blank string)
str.replace(/abc/g, '');
Posted by: Guest on February-08-2021
6

str replace javascript all

str.replace(/abc/g, '');
Posted by: Guest on May-16-2020
0

javascript replace all string

// String.prototype.replaceAll(searchValue, replaceValue)

'x'.replace('', '_');
// → '_x'

'xxx'.replace(/(?:)/g, '_');
// → '_x_x_x_'

'xxx'.replaceAll('', '_');
// → '_x_x_x_'
Posted by: Guest on June-25-2021
0

replace each string by another string javascript

str.split(search).join(replacement)
Posted by: Guest on February-05-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language