Clinteney Hui
Clinteney Hui

Reputation: 4565

How do i map this url

I am using google appengine and cant map this URL "user/[email protected]"

application = webapp.WSGIApplication( [('/user/(\w+)',UsersSubPath)],debug=True)

I dont know why this expression doesnt work. any ideas?

Upvotes: 1

Views: 71

Answers (1)

hyperslug
hyperslug

Reputation: 3623

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*)'

Upvotes: 1

Related Questions