exrex
exrex copied to clipboard
expanding class digit range
range like [0-80] will only match 1 digit at a time:
exrex "[0-80]"
0
1
2
3
4
5
6
7
8
0
i think is a good feature if exrex can count the whole range and from 0 to 80: 0 1 2 .. 23 .. 65 .. 80
it will facilate regex pattern considerably like in generating the following local ip address range: 192.168.0.0-192.168.255.255 for generating this ips one need to write a complex regex:
"^192\.168\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$"
but if supported we will only write:
"^192\.168\.[0-255]\.[0-255]$"
for making things easier we can write [n--m] or [n..m] [0--100] or [0..100] avoiding collision with regex class handling
Yep, that's the RegEx standard, I know from having tried this with other RegEx Engines. Couldn't possibly had been so hard to make the ranges arbitrary instead of single integers.
Why do you want to deviate from the regex standard, breaking compatibility, leading to unexpected behaviour?