Test, validate and match regular expressions
Matches any single character that is either a digit (0-9) or a whitespace character (space, tab, newline, carriage return). With the global flag enabled, it finds every occurrence of these characters throughout the input string rather than stopping at the first match. Commonly used for validating that input contains only numbers and spaces, or for extracting digits and whitespace from mixed text.