sync
This commit is contained in:
parent
981bf85cf0
commit
effb576089
@ -39,8 +39,9 @@ class punctuationManager():
|
|||||||
if customDict:
|
if customDict:
|
||||||
for key,item in customDict.items():
|
for key,item in customDict.items():
|
||||||
try:
|
try:
|
||||||
if item.upper().startswith('REGEX;') and (len(item) > 6):
|
regexLbl = 'REGEX;'
|
||||||
resultText = re.sub(str(key), seperator + str(item[6:]) + seperator, resultText)
|
if item.upper().startswith(regexLbl) and (len(item) > len(regexLbl)):
|
||||||
|
resultText = re.sub(str(key), seperator + str(item[len(regexLbl):]) + 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