From f9e9047fcf1f535e1850d292f21658b278173491 Mon Sep 17 00:00:00 2001 From: datawhores Date: Sat, 23 Mar 2024 10:03:56 -0500 Subject: [PATCH] fix error windows regex --- ofscraper/classes/placeholder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofscraper/classes/placeholder.py b/ofscraper/classes/placeholder.py index 77ca266a3..63c8c77fd 100644 --- a/ofscraper/classes/placeholder.py +++ b/ofscraper/classes/placeholder.py @@ -351,7 +351,7 @@ def _addcount(self, ele, out): return out out = re.sub(" $", "", out) # insert count - if re.search(r"\.[^.]+$", out): + if re.search(r"\.(?:[a-zA-Z0-9]+)$", out): out = re.sub(r"(\.(?!\.))", f"_{ele.count}.", out) else: out = f"{out}_{ele.count}"