regex /[^0-9\.]/g, "" code example
Example 1: "[0-9]+"
Just use regex [0-9]+ for matching a number of more than one digit. For example:
grep "[0-9]\+" file.txt
Example 2: /^ 0-9 *$/ decimal
/^\d*\.?\d*$/
Just use regex [0-9]+ for matching a number of more than one digit. For example:
grep "[0-9]\+" file.txt
/^\d*\.?\d*$/