Q:

Express route param regex repeats

I have a route where foo param is supposed to be positive integer and restricted with regular expression and * star repeat:
app.get('/foo/:foo([1-9][0-9]*)', fooHandler);

It matches /foo/10,  but doesn't match /foo/1 URL (route handler isn't called) and results in 404.
While
app.get('/foo/:foo([1-9])', fooHandler);

and
app.get('/foo/:foo([1-9][0-9]?)', fooHandler);

work, but they don't cover all param values.
Why does Express not match [1-9][0-9]* regex? How can it be fixed to match all positive integer foo values?

A:

You can use
app.get('/foo/:foo([1-9][0-9]{0,})', fooHandler);

instead of 
app.get('/foo/:foo([1-9][0-9]*)', fooHandler);

I thougt if  * has a special meaning in routes , why complicate things ? Why not replace it with {0,} instead ? Btw, It works , I checked .

