In Regex, . refers to any character, be it a number, an aplhabet character, or any other special character. * means zero or more times.
Repetition in regex by default is greedy: they try to match as many reps as possible, and when this doesn't work and they have to backtrack, they try to match one fewer rep at a time, until a match of the whole pattern is found. As a result, when a match finally happens, a greedy repetition would match as many reps as possible.
regex - What is the difference between .? and . regular expressions ...
Regex for a string of repeating characters and another optional one at the end regex to match a single character that is anything but a space Replace character in regex match only regex edited at 13:20 Peter Mortensen
How do I make an expression to match absolutely anything (including whitespaces)? Example: Regex: I bought _____ sheep. Matches: I bought sheep. I bought a sheep. I bought five sheep. I tried usi...
regex - How to match "any character" in regular expression? - Stack ...
Second, while the regex insures that each of those three kinds of character is present, it doesn't say anything about the rest of the string. That may have been a deliberate choice, but people usually try to insure that only those kinds of characters are present.
regex - What are ^.* and .*$ in regular expressions? - Stack Overflow
regex - What is a non-capturing group in regular expressions? - Stack ...
regex - What does ?= mean in a regular expression? - Stack Overflow