fix regex
This commit is contained in:
parent
effb576089
commit
8b5ae6a803
@ -40,8 +40,8 @@ class punctuationManager():
|
|||||||
for key,item in customDict.items():
|
for key,item in customDict.items():
|
||||||
try:
|
try:
|
||||||
regexLbl = 'REGEX;'
|
regexLbl = 'REGEX;'
|
||||||
if item.upper().startswith(regexLbl) and (len(item) > len(regexLbl)):
|
if key.upper().startswith(regexLbl) and (len(key) > len(regexLbl)):
|
||||||
resultText = re.sub(str(key), seperator + str(item[len(regexLbl):]) + seperator, resultText)
|
resultText = re.sub(str(key[len(regexLbl):]), seperator + str(item) + seperator, resultText)
|
||||||
else:
|
else:
|
||||||
resultText = resultText.replace(str(key),seperator + str(item) + seperator)
|
resultText = resultText.replace(str(key),seperator + str(item) + seperator)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user