Feat: lot s'adapte meme sans espace avant le tiret

This commit is contained in:
Bertrand Benjamin 2023-06-28 10:49:36 +02:00
parent 44d4150910
commit 5692898137
1 changed files with 1 additions and 1 deletions

View File

@ -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]))