Anomalous behaviour when compiling regular expressions?

Fredrik Lundh fredrik at pythonware.com
Mon Mar 13 16:42:30 EST 2006


Harvey.Thomas at informa.com wrote:

> I agree to a certain extent, but by analogy
>
> <!DOCTYPE a [
> <!ELEMENT a (b | c*)+>
> ]>
> <a></a>
>
> is a valid SGML/XML document and their is a lot of (superficial?)
> similarity between DTD content models and REs.

they're related, but they don't have the same semantics (Python uses
a backtracking engine, while the DTD model is a true DFA).

</F>






More information about the Python-list mailing list