From c6b0bfe6f2bc8aa94c9436a35a4d0244e3beed38 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Tue, 15 Aug 2023 00:39:10 -0500 Subject: [PATCH] hotfix/simplify-regex (#5324) --- openbb_terminal/parent_classes.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openbb_terminal/parent_classes.py b/openbb_terminal/parent_classes.py index e5ec6945bc9..11d31d2a52f 100644 --- a/openbb_terminal/parent_classes.py +++ b/openbb_terminal/parent_classes.py @@ -1004,8 +1004,7 @@ class BaseController(metaclass=ABCMeta): # Check if title has a valid format title = " ".join(ns_parser.name) if ns_parser.name else "" - # To this day, the reason why /^[a-zA-Z0-9\s]+$/ does not work is unknown - pattern = re.compile(r"^[a-zA-Z0-9\s]+(?:[a-zA-Z0-9\s]+)*$") + pattern = re.compile(r"^[a-zA-Z0-9\s]+$") if not pattern.match(title): console.print( f"[red]Title '{title}' has invalid format. Please use only digits, characters and whitespaces.[/]"