Test, validate and match regular expressions
The dot metacharacter matches any single character except a newline. With the global flag, it successively matches every character in the input string, one match at a time. This is commonly used for iterating over or counting all characters in text, tokenizing strings character-by-character, or serving as a wildcard building block in larger patterns.