users@jsr311.java.net

URI template with regexp using nested curly braces.

From: Andrzej Michalec <andrzej.michalec_at_googlemail.com>
Date: Tue, 3 Mar 2009 17:09:56 +0100

Hi everybody,
Specification says that URI template can specify regexp it matches. It
does not state what kind of regexp can be used, I assume Java regexp
as default. In that case it is possible to use nested curly braces
e.g. "/area/{zipcode:[0-9]{5}}" to match "/area/90210".

What I am looking for is regular expression that catches template
variables. Problem is in Java regexp nested expression are hard (or
impossible) to express -- perl regexp syntax has additional
constructions that allow to catch nested closing brackets, Java's way
is not to get out from regexp grammar towards context-free grammars
that would allow to match such recursion problem.
Any ideas?

I also wonder how jersey implementation takes care of nested curly braces.

cheers,
andy.