Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
In fact a caret isn't needed with re.match at the beginning of the expression in line 3 because .match only matches a pattern occurring at the beginning of a string. re.search would require the opening caret.