Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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 "
Comment

PREVIOUS NEXT
Code Example
Javascript :: history back js 
Javascript :: jquery scroll to top 
Javascript :: remove all inline css jquery 
Javascript :: datatable scroll horizontal 
Javascript :: create react project 
Javascript :: input will get only number vue 
Javascript :: jquery delete grand parent of clicked element 
Javascript :: modal.show jquery 
Javascript :: javascript get current month start and end date 
Javascript :: get height element use js 
Javascript :: Could not resolve dependency: peer react@"^18.2.0" from react-dom@18.2.0 
Javascript :: javascript trello title swap 
Javascript :: js random number between 1 and 100 
Javascript :: Error: Timeout - Async function did not complete within 5000ms (set by jasmine.DEFAULT_TIMEOUT_INTERVAL) site:stackoverflow.com 
Javascript :: link next js target _blank 
Javascript :: jquery disable all input form 
Javascript :: syntax jquery 
Javascript :: js scrolling in div 
Javascript :: colab notebook keeps getting disconnected 
Javascript :: jquery onscroll sticky header 
Javascript :: unique objects in array javascript 
Javascript :: get window size javascript 
Javascript :: las element of object 
Javascript :: how to remove cors error from node app 
Javascript :: nodejs does every worker thread need a new core 
Javascript :: javascript get url path 
Javascript :: js get data attribute 
Javascript :: Error: Material-UI: The data grid component requires all rows to have a unique id property. 
Javascript :: js get viewport width 
Javascript :: history.push in nextjs 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =