From 830461645710c5bbd7bed652e77ca00cd4def929 Mon Sep 17 00:00:00 2001 From: Michal Ambroz <723625+xambroz@users.noreply.github.com> Date: Sat, 4 May 2024 17:00:39 +0200 Subject: [PATCH] rtfobj.py syntax error In python 3.12+ it is reporting the syntax error oletools/rtfobj.py:272 /rpmbuild/BUILD/oletools-78b2d459a33df378a4f69ffc6c33313509cecfe4/oletools/rtfobj.py:272: SyntaxWarning: invalid escape sequence '\d' DECIMAL_GROUP = b'(\d{1,250})' --- oletools/rtfobj.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oletools/rtfobj.py b/oletools/rtfobj.py index f0b4e654..c32fbbc8 100644 --- a/oletools/rtfobj.py +++ b/oletools/rtfobj.py @@ -269,7 +269,7 @@ def get_logger(name, level=logging.CRITICAL+1): DELIMITERS_ZeroOrMore = b'[ \\t\\r\\n\\f\\v]*' BACKSLASH_BIN = b'\\\\bin' # According to my tests, Word accepts up to 250 digits (leading zeroes) -DECIMAL_GROUP = b'(\d{1,250})' +DECIMAL_GROUP = b'(\\d{1,250})' re_delims_bin_decimal = re.compile(DELIMITERS_ZeroOrMore + BACKSLASH_BIN + DECIMAL_GROUP + DELIMITER)