Fix usage of str.match