【发布时间】:2011-05-10 14:53:01
【问题描述】:
我在我的应用程序中使用 Django,需要进行模式匹配
要匹配的模式:users/?q=john 正则表达式:'^users/\?q\=(?P[\w]+)[/]?$'
在 urls.py 中像这样
url(r'^users/\?q\=(?P[\w]+)[/]?$', user_handler, {'emitter_format' : 'json'})
但是它与 URL 不匹配,任何指针都会有帮助。
谢谢
【问题讨论】:
标签: regex django django-urls