March 2003
Intermediate to advanced
656 pages
39h 30m
English
end, span, start
m.end(groupid=0)
m.span(groupid=0)
m.start(groupid=0)These methods return the delimiting indices, within
m
.string, of the
substring matching the group identified by
groupid, where
groupid can be a group number or name.
When the matching substring is
m
.string[
i:j
],
m
.start returns
i,
m
.end returns
j, and
m
.span returns
(
i,
j
). When the group did
not participate in the match, i and
j are -1.
Read now
Unlock full access