![regex for number of digits regex for number of digits](https://aws1.discourse-cdn.com/uipath/original/3X/3/7/37a609e8e6a714c79d378fc39a7c8d64c8cdd9a7.png)
So the whole sequence can be reduce to: |\d*(|) - numbers divisible by 4 Also, as the 40s, 60s and 80s have the same pattern we can include them: and the others have a pattern too. For example, instead of using 20|24|28 we can use 2. \d* matches any number that divides by 2 - any number ending in 0,2,4,6 or 8 0-9), it can be replaced with a shorthand (d). If the character group allows any digit (i.e. Or you can match a range of digits with a character group e.g. You can use a number from 0 to 9 to match a single choice. \d* matches any number that divides by 5 - any number ending in 0 or 5 With regex you have a couple of options to match a digit. \d*00 matches any number that divides by 100 - any number ending in 00 Matching numbers that divide by other numbers: \d*0 matches any number that divides by 10 - any number ending in 0 \d|100 matches 0 to 100 one to two digits OR 100 \d* will match 0 or more consecutive digits After you find all the items, filter them with the length specified. To find numbers of specific length, N, is a string, use the regular expression 0-9+ to find number strings of any length.0-9 matches a single digit. If you want to match only strings that contain EXACTLY 4. Python RegEx Find numbers of Specific Length in String. Currently, this matches any string that contains a sequence of 4 digits anywhere in the string. \d+ will match 1 or more consecutive digits If you want to allow your 4-digit number to start with a 0, you should use the 'Phone number or Numeric ID' data type.
![regex for number of digits regex for number of digits](https://miro.medium.com/max/1400/1*iV4GKHeCnBhrNrkIjp-pog.png)
Matching multiple digits \d\d will match 2 consecutive digits
![regex for number of digits regex for number of digits](https://dwgeek.com/wp-content/uploads/2019/12/Snowflake-Extract-Numbers-using-Regular-Expression-Functions.jpg)
Where a and b are digits in the range 0 to 9 will match a single digit in the range 3 to 7.