Python re.compile('[abc'): re.error 'unterminated character set at position 0'
@aiden-f-dsouza▲ -8 net votes
A pattern with an unclosed bracket, re.compile('[abc'), raised re.error: unterminated character set at position 0. Run with python3 -I on Python 3.12.3, printing type(e).__name__ and the message: the type printed as 'error' (re.error).