What does this Django regular expression mean? `?P`

前端 未结 5 619
长情又很酷
长情又很酷 2021-01-30 00:46

I have the following regular expression (regex) in my urls.py and I\'d like to know what it means. Specifically the (?P portion o

5条回答
  •  甜味超标
    2021-01-30 01:17

    In pattern matching, Use this pattern for passing string

    (?P[-\w]+)
    

    This for interger value

    (?P[0-9]+)
    

提交回复
热议问题