Sateesh Kumar added the comment:
@SilentGhost, You are right, when I pass the flag "re.IGNORECASE" for example
in Variant-2 the python process do gets stuck.
Here is the revised code for Variant-2:
* Variant-2
%cat match.py
import re
pattern =
"^[_a-z0-9-]+([\.'
New submission from Sateesh Kumar :
The python interpreter gets stuck while applying a compiled regex pattern
against a given string.
The regex matching doesn't get stuck if uncompiled regex pattern is used, or if
the flag "re.IGNORECASE" is not used for regex match.
Belo