dhanji / sitebricks

Sitebricks: A fast platform for web development.
http://sitebricks.org
Apache License 2.0
248 stars 63 forks source link

rest: match paths using regexp #79

Open mgenov opened 8 years ago

mgenov commented 8 years ago

Adds regex pattern matching on paths, so path variables could be more complex that are now.

Here are some examples

/r/users/:id{\d+}

will match only

/r/users/123

but not

/r/users/john

Note: testng version was updated in pom.xml due issue with latest Intellij IDEA 15. If this change is breakable, the pom.xml changes will be reverted.

mgenov commented 8 years ago

cc @jvanzyl @dhanji

mgenov commented 8 years ago

Another possible option would be brackets to wrap variable and regexp: {id:\d+}

mgenov commented 8 years ago

ping

mgenov commented 8 years ago

ping2