Compile Method In Regex Python Library