結果 : how to check if a string matches a regex pattern in python