1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > python正则表达式常用函数和正则表达式符号查询

python正则表达式常用函数和正则表达式符号查询

时间:2019-07-31 02:07:18

相关推荐

python正则表达式常用函数和正则表达式符号查询

python正则表达式常用

>>> import re>>> re.__all__['match', 'fullmatch', 'search', 'sub', 'subn', 'split', 'findall', \'finditer', 'compile', 'purge', 'template', 'escape', 'error', 'Pattern', \'Match', 'A', 'I', 'L', 'M', 'S', 'X', 'U', 'ASCII', 'IGNORECASE', \'LOCALE', 'MULTILINE', 'DOTALL', 'VERBOSE', 'UNICODE']

主要经常用到的有:

match(), fullmatch(), search(), sub(), split(),findall(),finditer(),compile()。其中频率最高的几个是search(),sub(),split(),findall()。

详细用法请help(re.xxx)。

关于正则表达式

本文只作速查,详细请看高手的参考资料。

参考资料:/tutorials/regex/regex.htm

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。