What does the regular expression ^(\d{1,2})$ mean?
regex
Solution
- `^` Asserts position at start of the string
- `(` Denotes the start of a capturing group
- `\d` Numerical digit, 0, 1, 2, ... 9. Etc.
- `{1,2}` one to two times.
- `)` You guessed it - Closes the group.
- `$` Assert position at end of the string
Regular expression visualization:
Problem
I am trying to understand what the regular expression ^(\d{1,2})$ stands for in google sheets. A quick look around the regex sites and in tools left me confused. Can anybody please help?