[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG - GlobbingLexiconNG.py:1.1.2.7
Andreas Jung
andreas@digicool.com
Sat, 12 Jan 2002 14:57:14 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG
In directory cvs.zope.org:/tmp/cvs-serv20837
Modified Files:
Tag: ajung-textindexng-branch
GlobbingLexiconNG.py
Log Message:
minor fixes
=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/GlobbingLexiconNG.py 1.1.2.6 => 1.1.2.7 ===
wc_set = [multi_wc, single_wc]
- glob_reg = re.compile('[\?\*]')
-
+ glob_reg = re.compile(r'[?*]')
def __init__(self):
self.clear()
@@ -141,7 +140,7 @@
if len(pattern)==1: return r
# no globbing
- if not self.glob_reg.match(pattern):
+ if not self.glob_reg.search(pattern):
result = self._lexicon.get(pattern, None)
@@ -164,7 +163,7 @@
else:
try:
- if pattern[i+1] not in wc_set:
+ if pattern[i+1] not in self.wc_set:
digrams.append( pattern[i:i+2] )
except IndexError:
@@ -254,5 +253,4 @@
result = result.replace( '?', '.')
return "%s$" % result
-