Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 urls.py 中的这一位需要九个字符的值...
(r'^launch/(?P<app_id>[0-9A-Za-z]{9})/*', 'mysite.views.launch_app'),
如何更改它,使其至少需要九个字符值?
将 RegEx 更改为{9,}应该这样做。
{9,}
(r'^launch/(?P<app_id>[0-9A-Za-z]{9,})/*', 'mysite.views.launch_app'),
你可以这样做:[0-9A-Za-z]{9,} 匹配9个或更多。
[0-9A-Za-z]{9,}