Answers for "how to remove all ! from a string in javascript"

2

remove all characters from string javascript

const string = "hello world 123";

// remove all o's from the string
string.replace(/o/g, "") // "hell wrld 123"

// remove all letters from the string
string.replace(/[A-Za-z]/g, "") // "  123"

// remove all digits from the string
string.replace(/\d/g, "") // "hello world "
Posted by: Guest on May-30-2021
0

how to dekete from string all "," js

var text = "A , normal , text ,";
var final = text.replace(/\,/g,"");
console.log(final);
Posted by: Guest on June-30-2021

Code answers related to "how to remove all ! from a string in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language