--- a/src/httpcode/__init__.py +++ b/src/httpcode/__init__.py @@ -168,7 +168,7 @@ Special case, use 'x' for any digit $ hc 1xx """ - _has_code_match = re.compile(code.replace('x', '\d') + '$').match + _has_code_match = re.compile(code.replace('x', r'\d') + '$').match found_codes = [c for c in STATUS_CODES if _has_code_match(str(c))] if not found_codes: _exit('No code found corresponding to: %s\n' % code)