I've been trying to design a Google AppEngine Python handler regex and haven't been too successful in getting it to work.
I'm trying to handle API calls similar to OpenStreetMap's.
My current regex looks like this:
/api/0.6/(.*?)/(.*?)\/?(.*?)
But when this comes in:
/api/0.6/changeset/723/close
It incorrectly groups 723/close
and changeset
, when I wanted it to group it into three things: changeset
, 723
, and close
.
The last slash and group is optional, thus the \/?
.