Evaluating a regular expression range
- by Dan Atkinson
Hi there!
Is there a nice way to evaluate a regular expression range, say, for a url such as
http://example.com/[a-z]/[0-9].htm
This would be converted into:
http://example.com/a/0.htm
http://example.com/a/1.htm
http://example.com/a/2.htm
...
http://example.com/a/9.htm
...
http://example.com/z/0.htm
http://example.com/z/1.htm
http://example.com/z/2.htm
...
http://example.com/z/9.htm
I've been scratching my head about this, and there's no pretty way of doing it without going through the alphabet and looping through numbers.
Thanks in advance!