users@jsr311.java.net

Re: URI template with regexp using nested curly braces.

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 10 Mar 2009 14:01:41 -0400

On Mar 10, 2009, at 1:51 PM, Sergey Beryozkin wrote:
>>>
>>> Can someone confirm please that as far as handling expressions
>>> like "/area/{zipcode:[0-9]{5}}", it's up to
>>> a given implementation how to handle them and no assumption can
>>> be made that the default Java regexp should be used ?
>>>
>> How exactly an implementation supports regexs is up to the
>> application but I think all implementations need to support the
>> same regex syntax. I'd assumed the standard Java syntax would the
>> one we'd use, it would be odd to pick another one.
>
> Thanks - the question is more about if the default Java regex
> support is capable of handling the nested curly braces - it appears
> that it's not quite easy to handle with the default support
>
Paul will have to confirm but, IIRC, for Jersey we had to resort to
other means (bracket counting etc) to parse the @Path value.

Marc.