python - ?P<sign>.*中的p是什么意思呢
天蓬老师
天蓬老师 2017-04-18 09:51:31
0
3
1294
m = re.match(r'(\w+) (\w+)(?P<sign>.*)', 'hello world!')

这句代码中的?P<sign>.*里的p是什么意思?或者给我一篇博客参考下用法。

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
PHPzhong

Python Regular Expression Guide

阿神

Here is another link to learn regular expressions
Introduction to Python crawler seven regular expressions

Ty80

In fact, it means named group in regular expression. You can think of this P as the abbreviation of the word Pattern

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template