diff --git a/src/fenrirscreenreader/core/punctuationManager.py b/src/fenrirscreenreader/core/punctuationManager.py index ee42f6d8..a84e9764 100644 --- a/src/fenrirscreenreader/core/punctuationManager.py +++ b/src/fenrirscreenreader/core/punctuationManager.py @@ -40,8 +40,8 @@ class punctuationManager(): for key,item in customDict.items(): try: regexLbl = 'REGEX;' - if item.upper().startswith(regexLbl) and (len(item) > len(regexLbl)): - resultText = re.sub(str(key), seperator + str(item[len(regexLbl):]) + seperator, resultText) + if key.upper().startswith(regexLbl) and (len(key) > len(regexLbl)): + resultText = re.sub(str(key[len(regexLbl):]), seperator + str(item) + seperator, resultText) else: resultText = resultText.replace(str(key),seperator + str(item) + seperator) except Exception as e: