Know your match

Report a typo

Take a look at the following code:

template = "bohemian"
string = "bohemian rhapsody"
match = re.match(template, string)

Match the methods of a Match object match (no pun intended) with the values they return.

Match the items from left and right columns
group()
span()
end()
start()
8
bohemian
(0, 8)
0
___

Create a free account to access the full topic