From 50eb5dbc8a2ae4ef498fca593f94b817a565d170 Mon Sep 17 00:00:00 2001 From: Drugsosos <44712637+Drugsosos@users.noreply.github.com> Date: Sun, 17 Jul 2022 23:27:31 +0300 Subject: [PATCH] fixes in regex --- video_creation/final_video.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 6621e5b..7a8da83 100755 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -53,11 +53,11 @@ class FinalVideo: name: str ) -> str: name = re.sub(r'[?\\"%*:|<>]', "", name) - name = re.sub(r"( [w,W]\s?\/\s?[o,O,0])", r" without", name) - name = re.sub(r"( [w,W]\s?\/)", r" with", name) - name = re.sub(r"(\d+)\s?\/\s?(\d+)", r"\1 of \2", name) - name = re.sub(r"(\w+)\s?\/\s?(\w+)", r"\1 or \2", name) - name = re.sub(r"\/", "", name) + name = re.sub(r"( [w,W]\s?/\s?[oO0])", r" without", name) + name = re.sub(r"( [w,W]\s?/)", r" with", name) + name = re.sub(r"(\d+)\s?/\s?(\d+)", r"\1 of \2", name) + name = re.sub(r"(\w+)\s?/\s?(\w+)", r"\1 or \2", name) + name = re.sub(r"/", "", name) # name[:30] # the hell this little guy does? commented until explained lang = settings.config["reddit"]["thread"]["post_lang"]