A pure-Python regular expression library, compatible with the re package. RXPY can be used as a test-bed for new matching algorithms - the parser and compatibility components are reusable.
RXPY includes the concept of "alphabets". These let you define a regular expression for types other than strings. The initial code includes a proof-of-concept that matches lists of integer digits.
RXPY allows different engines to be used during matching. The initial code includes a simple, recursive matcher, but the aim is to eventually support a DFA-based matcher, modelled on re2.
The regular expression is represented internally as a graph, parameterised by the alphabet and interpreted by the engine.
The main disadvantage with the current (C-based) Python interpreter is speed. Also, locale-based character groups are not supported and the alphabet-based approach can give slightly different results when mixing ASCII and Unicode strings.
> easy_install rxpy
Everything here my own work, unless attributed otherwise, (c) 2010 Andrew Cooke.