Intercodes wrote: > Hello everyone, > > This question is just out of curiosity. I am working with this dragon > book. From what I have learnt so far, RE uses either NFA or DFA to check > whether the string is accepted or not. (Correct?) > > So what does the Python's RE module use to check the correctness of the > string, NFA or DFA?
You could look at the source. A little digging shows that REs are parsed by sre_parse.parse() which is in Python24\Lib\sre_parse.py on my computer. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor