RXPY 0.1

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.

Alphabets

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.

Engines

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.

Graph

The regular expression is represented internally as a graph, parameterised by the alphabet and interpreted by the engine.

Disadvantages

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.

Installation

> easy_install rxpy

The easy_install command is provided by the distribute package. Please see distribute's installation instructions.