The *
quantifier matches zero or more occurences.
In practice, this means that
\d*
will match every possible input, including the empty string. So your regex matches at the start of the input string and returns the empty string.
Related Contents:
- Tempered Greedy Token – What is different about placing the dot before the negative lookahead?
- How do (*SKIP) or (*F) work on regex?
- Regex match entire words only
- Regular Expression to match valid dates
- How to capture multiple repeated groups?
- Regex: ignore case sensitivity
- Regular expression to find URLs within a string
- Regular expression for first and last name
- How do I make part of a regex match optional?
- Regex for quoted string with escaping quotes
- Regex – Should hyphens be escaped? [duplicate]
- Regex: matching up to the first occurrence of a character
- How to use conditionals when replacing in Notepad++ via regex
- How to use regex with find command?
- Regular expression to match string starting with a specific word
- MongoDB Regex Search on Integer Value
- Extract a regular expression match
- Convert a char to upper case using regular expressions (EditPad Pro)
- Does a dot have to be escaped in a character class (square brackets) of a regular expression?
- Negating a backreference in Regular Expressions
- How to check if a line is blank using regex
- Regular expression that doesn’t contain certain string [duplicate]
- Regex match everything after question mark?
- Make regular expression not match empty string?
- Regular Expressions- Match Anything
- Regex to match all permutations of {1,2,3,4} without repetition
- What’s the regular expression that matches a square bracket?
- Multiline regex to match config block
- How to replace all strings to numbers contained in each string in Notepad++?
- Remove all text between two brackets
- Math operations in regex
- Convert dd/mm/yy and dd/mm/yyyy to Dates
- Password validation regex
- regex for zip-code
- How to use RegEx in Dart?
- Regex number between 1 and 100
- Delete all content but keeping matched
- Bash, grep between two lines with specified string
- Have HTML5’s a inputs pattern attribute ignore case
- Unicode Regex; Invalid XML characters
- How to invert a grep expression
- Can extended regex implementations parse HTML?
- Regex optional group
- Unix grep regex containing ‘x’ but not containing ‘y’
- RegularExpressionAttribute – How to make it not case sensitive for client side validation?
- How do I get regex support in Excel via a function, or custom function?
- Difference between regular expression modifiers (or flags) ‘m’ and ‘s’?
- RegEx for Prices?
- How can I match spaces with a regexp in Bash?
- explain gitignore pattern matching