Answers for "string replace in ts"

6

replace string in typescript

var re = /apples/gi; 
var str = "Apples are round, and apples are juicy.";
var newstr = str.replace(re, "oranges"); 
console.log(newstr)
Posted by: Guest on April-02-2020
6

str replace javascript all

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language