From 9d9fd727175e102a83aec4aaeb74fcd03b914179 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 29 Aug 2008 04:39:58 -0400 Subject: [PATCH] Added regexp matching for Location search --- chem_web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chem_web.py b/chem_web.py index c49ffc7..9dc68f0 100755 --- a/chem_web.py +++ b/chem_web.py @@ -189,8 +189,8 @@ class docs (object) : db._refresh() formdata = web.input() user_regexp = formdata['regexp'] - regexp = self.validate_string(user_regexp) - path = dgen.door_warning(lambda r: r['Location'] == regexp ) # no regexp matching yet, work in progress + regexp = re.compile(self.validate_string(user_regexp), 'I') # Case insensitive + path = dgen.door_warning(lambda r: regexp.match(r['Location'])) print file(path, 'rb').read() , def validate_string(self, string): # work in progress return string -- 2.26.2