Python RE
2017-11-01 11:02:21 8 举报
AI智能生成
Python Regular Expression MindMap
作者其他创作
大纲/内容
RE Objects
regex.
search
(string[, pos[, endpos]]) regex.
match
(string[, pos[, endpos]])regex.
fullmatch
(string[, pos[, endpos]])regex.
split
(string, maxsplit=0) regex.
findall
(string[, pos[, endpos]])regex.
finditer
(string[, pos[, endpos]])regex.
sub
(repl, string, count=0)regex.
subn
(repl, string, count=0)regex.
flags
regex.groups
regex.groupindex
regex.pattern
Match Objects
match.
expand
(template) match.
group
([group1, ...])match.
__getitem__
(g)match.
groups
(default=None)match.
groupdict
(default=None)match.
start
([group])match.end
([group])match.
span
([group]) match.
pos
match.
endpos
match.
lastindex
match.
lastgroup
match.
re
match.string
RE: Syntax
. ^ $
[] | \ (...)
[] | \ (...)
* + ? {m} {m,n}
*? +? ?? {m,n}?
*? +? ?? {m,n}?
(?aiLmsux) (?:...) (?imsx-imsx:...) (?#...)
(?P<name>...) (?P=name)
\number
\number
(?=...) (?!...) (?<=...) (?<!...)
(?(id/name)yes-pattern|no-pattern)
(?(id/name)yes-pattern|no-pattern)
\A \Z \b \B
\d \D \s \S \w \W
\d \D \s \S \w \W
RE: Module Contents
RE: Flag
re.A re.I re.L re.M re.S re.X
re.
compile
(pattern, flags=0) re.
search
(pattern, string, flags=0) re.
match
(pattern, string, flags=0)re.
fullmatch
(pattern, string, flags=0)re.
split
(pattern, string, maxsplit=0, flags=0) re.
findall
(pattern, string, flags=0)re.
finditer
(pattern, string, flags=0)re.
sub
(pattern, repl, string, count=0, flags=0)re.
subn
(pattern, repl, string, count=0, flags=0)re.
escape
(pattern)re.
purge
() exception
re.
error
(msg, pattern=None, pos=None) 收藏
收藏
0 条评论
下一页