Hello,
I seem to have the same error:
File "/home/...., line 379, in findWholeWord
return re.compile(r'\b({0})\b'.format(w), flags=re.IGNORECASE).search
File "/usr/local/lib/python3.9/re.py", line 252, in compile
return _compile(pattern, flags)
File "/usr/local/lib/python3.9/re.py", line 304, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/local/lib/python3.9/sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "/usr/local/lib/python3.9/sre_parse.py", line 948, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/local/lib/python3.9/sre_parse.py", line 443, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
File "/usr/local/lib/python3.9/sre_parse.py", line 805, in _parse
flags = _parse_flags(source, state, char)
File "/usr/local/lib/python3.9/sre_parse.py", line 887, in _parse_flags
raise source.error(msg, len(char))
re.error: missing -, : or ) at position 5
with this code:
def findWholeWord(w):
return re.compile(r'\b({0})\b'.format(w), flags=re.IGNORECASE).search
The above code works well with my python idle (version 3.9) but after changing to version 3.9 on PA, this erros comes on board. ANy help?