Home / Code Snippets / JavaScript / Strip Numbers from a String

Strip Numbers from a String

var someString = "Hello 123 World!";

newString = someString.replace(/[0-9]/g, '');

// console.log(newString);
// "Hello  World!";