From 569289813730c67b72524aa1a2c9b3cf3bf35fe2 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Wed, 28 Jun 2023 10:49:36 +0200 Subject: [PATCH] Feat: lot s'adapte meme sans espace avant le tiret --- pdf_oralia/pages/charge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf_oralia/pages/charge.py b/pdf_oralia/pages/charge.py index 8a0a796..b7b9f9c 100644 --- a/pdf_oralia/pages/charge.py +++ b/pdf_oralia/pages/charge.py @@ -30,7 +30,7 @@ def is_it(page_text): def get_lot(txt): """Return lot number from "RECAPITULATIF DES OPERATIONS" """ - regex = r"[BSM](\d+)\s-" + regex = r"[BSM](\d+)(?=\s*-)" result = re.findall(regex, txt) if result: return "{:02d}".format(int(result[0]))