【发布时间】:2010-01-05 08:05:40
【问题描述】:
application = webapp.WSGIApplication(
[(r'/main/profile/([a-f0-9]{40})', ProfileHandler)],
debug=True)
上述参数中的正则表达式在 Google App Engine 中无法识别 40 十六进制长的十六进制摘要。
我得到的是 404,而不是 ProfileHandler 被传递了匹配的 40 十六进制长配置文件 ID。我的 app.yaml 将所有内容 /main/.* 传递给正确的 python 脚本,所以这不是问题。正则表达式看起来很理智并且resembles the example regex in GAE docs。这个正则表达式有什么问题?
【问题讨论】:
标签: python regex google-app-engine web-applications