showing results for - "remove all characters from string javascript"
Gabriela
27 Jun 2018
1const string = "hello world 123";
2
3// remove all o's from the string
4string.replace(/o/g, "") // "hell wrld 123"
5
6// remove all letters from the string
7string.replace(/[A-Za-z]/g, "") // "  123"
8
9// remove all digits from the string
10string.replace(/\d/g, "") // "hello world "
queries leading to this page
how to remove some characters from a string in javascriptremove all characters from string jqueryremove all letters from string jsremove all of character from string javascriptjs string remove all charremove all instances of character from string javascriptjavascript remove all lettersremove all alphabets from string javscript regexjavascript string remove all characters afterstrip characters from a string javascriptremove all characters from string except letters javascriptremove all char from string jsjavascript remove all character from stringremove all the letters from array javascriptremove all word from a caharcter jsjs remove all characters in 28 29 bractets from stringjavascript remove all letters from stringremove all characters string javascriptjavascript remove remove every instances of character from stringremove all characters up to char jsdelete all char from str jsremove all characters from string typescripthow to remove all the characters after in a string using node jsjavascript remove all characters from string at indexremove all char and symbols from string jsremove all characters from string js javascripthow to remove all of a certain character in javascriptjavascript remove all instances of character from stringjavascript remove all charactersjs remove all char from stringstring remove all character javascriptremove all the characters from a string in jsremove all character in string javascriptremove all a letters from string javascriptremove all string characters from number jsremove all characters from regex javascriptremove all character from string javascriptjavascript remove all characters from stringremove all letters from string javascript regexjavascript remove all characters from end of string after a certain characterdelete all string from string jsfind a character and remove all to string javascriptremove all from char javascriptremove all letters from string javascriptjavascript string remove all characters up to specific oneremove all characters from number jsremove all characters from string jsjs remove all characters from string exceptremove all characters from a string javascriptremove all instances of string from string javascripthow to remove all characters from a string in javascriptremove all from character string javascriptremove all characters javascriptjavascript regex remove all charactersremove all characters in a string except alphabets javascriptremove all chars after specific char javascriptremove all characters from string javascriptremove all characters after a specific character in javascriptjavascript remove all of characterremove all instances of character from string jsremove 253 characters from string jsjs remove all characters after a characterjs delete all charactereremove all word after a caharcter jsjs remove all of one letters from stringjs remove all chars froma string before a charremove all symbols from string javascriptjs string remove all charactershow to remove all letters from a string javascriptjs remove all characters after specific stringremove all periods from string javascripthow to remove all letters from string in jsjs remove all char in stringremove all characters from string before a certain character javascripthow to remove all characters in javascripthow to remove all character from string javascriptremove many chars from string jsjs how to find all of one character in string and deletejs remove all letters from stringremove all of one character from string javascripthow to remove all instances of a char in a string jsjs remove all characters from stringremove all characters from string past a certain character javascripthow to remove all letters from string in javascriptremove all characters jsremove all characters from string javascript