remove alphabets from string javascript regex code example Example: js remove all non numeric from string numString = myString.replace(/\D/g,'');