Test, validate and match regular expressions
Matches zero or more consecutive digits (0-9) in a string. The global flag (g) ensures all digit sequences throughout the input are found, not just the first one. Commonly used for extracting numbers from text, validating numeric content, or tokenizing digit runs. Note that since * permits zero matches, this pattern will match empty strings between non-digit characters.