In order to construct it, it needs to know some things. A zero-or-more repeats is simple to construct, as is one-or more (they take very few nodes). X-repeats (where X is a known number) involve creating more nodes (on the order of X). But you have to know how many, or you can't construct the automata. And that's why it doesn't work..
As for your second question, you would simply replace (\d) with (\d\d) - there is no reason why \1 needs to be just one character...
In reply to Re: RegExp madness
by matija
in thread RegExp madness
by palandir
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |