How do i map this url
I am using google appengine and cant map this URL "user/test@example.com"
applic开发者_JS百科ation = webapp.WSGIApplication( [('/user/(\w+)',UsersSubPath)],debug=True)
I dont know why this expression doesnt work. any ideas?
You'll have to widen the scope of your regex. \w
only matches [A-Za-z0-9]
which excludes the special characters @
and .
. For this example you could use:
'/user/([A-Za-z0-9@.]*)'
or
'/user/(\S*)'
精彩评论