[IronPython] re incompatible with CPython?

Sanghyeon Seo sanxiyn at gmail.com
Sun Nov 12 03:00:30 CET 2006

2006/11/12, Christopher Baus <christopher at baus.net>:
> I'm running into problems with modules that use regex.  Does anybody have
> a good idea how close the IronPython regex library mimics CPython?  I'm
> getting close to the point of giving up and going back to CPython.

I know the pain. :(

I have a good idea how heroically IronPython mimics CPython re using
System.Text.RegularExpression. I also know that it's not there. I have
a good faith that it will be there someday.

Before giving up, you may want to try PyPy's regex implementation.

You may need to edit a few places :(, but it works. I have tried it
long time ago, and went back to IronPython's re, because it needs to
be fixed anyway. You need to delete IronPython's implementation in C#
and recompile before using PyPy's pure Python implementation.

_sre.py is *not* slow, and I am confident it's 100% compatible for all
realistic cases.

Seo Sanghyeon

More information about the Ironpython-users mailing list