Test, validate and match regular expressions
This regex matches any character that is not a digit or a period. It is commonly used to sanitize currency or numeric input fields, removing all invalid characters so only numbers and decimal points remain. The global flag ensures every non-numeric character is stripped from the string.