Name
RegExp
Synopsis
Regular expression objects are created with the
re.compile
function.
flags
Return the flags argument used when the object was compiled or 0.
groupindex
Return a dictionary that maps symbolic group names to group numbers.
pattern
Return the pattern string used when the object was compiled.
match(
string
[,pos
[,endpos
]])
search(
string
[,pos
[,endpos
]])
split(
string
[,maxsplit
=0])
sub(
repl
,string
[,count
=0])
subn(
repl
,string
[,count
=0])
findall(
string
)
Same as the
re
module functions, exceptpattern
is implied.pos
andendpos
give start and end string indexes for the match.
Get Regular Expression Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.