a simple implementation of regex in python
Python
Switch branches/tags
Nothing to show
Latest commit e579129 Mar 8, 2012 @colinmarc colinmarc readme
Permalink
Failed to load latest commit information.
README.md readme Mar 9, 2012
pyregex.py greedy matching Mar 9, 2012
test.py initial commit Feb 18, 2012

README.md

this is a simple implementation of regex done in python for my own education. usage:

>>> from pyregex import Regex
>>> r = Regex('^abc{2,3}[ed]+')
>>> r.match('something random')
False
>>> r.match('abccdedededexxx')
'abcdededede'
>>> r.match('abccdedededexxx', greedy=False)
'abccd'

or, to run the tests, just run python pyregex.py