]>
code.delx.au - monosys/blob - python/quickre.py
1 # Copyright 2007 James Bunton <jamesbunton@fastmail.fm>
2 # Licensed for distribution under the GPL version 2, check COPYING for details
3 # Quicker, easier regular expressions
8 def __init__(self
, regex
):
9 self
.regex
= re
.compile(regex
)
12 assert isinstance(s
, basestring
)
13 return self
.regex
.search(s
)