js regular expression for not numbers code example Example: regex all not numbers echo 1a2b3c | sed 's/[^0-9]//g' #Replaces all not numbers abc