I have pattern:
/^(?:{?[a-z0-9\-_]+\??}?\/)+$/
Now these strings match the pattern
user/1/modify/
user/{id}/modify/
user/{id?}/modify/
It's OK, but now this pattern match
user/{id?/modify/
If the left curly brace start it must end with right. I tried with lookahead but i dont't know it is right way.