string and text handling groupdict([default]returns dictionary containing all the named subgroups of the match default is the value returned for groups that didn' participate in the match (the default is nonem start([group] end([group]these two methods return the indices of the start and end of the substring matched by group if group is omittedthe entire matched substring is used returns none if the group exists but didn' participate in the match span([group]returns -tuple ( start(group) end(group)if group didn' contribute to the matchthis returns (nonenoneif group is omittedthe entire matched substring is used pos the value of pos passed to the search(or match(function endpos the value of endpos passed to the search(or match(function lastindex the numerical index of the last group that was matched it' none if no groups were matched lastgroup the name of the last named group that was matched it' none if no named groups were matched or present in the pattern re the regular-expression object whose match(or search(method produced this matchobject instance string the string passed to match(or search(example the following example shows how to use the re module to search forextract data fromand replace text pattern in string import re text "guido will be out of the office from regex pattern for date datepat re compile('(\ +)/(\ +)/(\ +)'find and print all dates for in datepat finditer(text)print( group() lib fl ff