From b414e5f1ca9738634ce93111bb95dff348ee7e36 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 8 Feb 2011 23:44:06 +0100 Subject: mensa: Ignore case in regex --- modules/mensa.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/mensa.py b/modules/mensa.py index 3c3a197..d86183a 100644 --- a/modules/mensa.py +++ b/modules/mensa.py @@ -32,8 +32,8 @@ class Module(ModuleBase): return def handle_data(data): - r = re.compile(r'.*?]*>(.*?).*?]*>(.*?)', re.DOTALL) - r2 = re.compile(r'.*?]*>(.*?)', re.DOTALL) + r = re.compile(r'.*?]*>(.*?).*?]*>(.*?)', re.DOTALL|re.IGNORECASE) + r2 = re.compile(r'.*?]*>(.*?)', re.DOTALL|re.IGNORECASE) def handle_data_row(data, pos): match = r.match(data, pos) @@ -59,7 +59,7 @@ class Module(ModuleBase): return (ret, match.end()) - match = re.compile(r'^.*?]*>.*?]*>.*?(\d+)\.(\d+)\. - \d+\.\d+\.(\d+).*?.*?]*>Freitag\s*(.*?).*$', re.DOTALL).match(data) + match = re.compile(r'^.*?]*>.*?]*>.*?(\d+)\.(\d+)\. - \d+\.\d+\.(\d+).*?.*?]*>Freitag\s*(.*?).*$', re.DOTALL|re.IGNORECASE).match(data) if not match: return False -- cgit v1.2.3