From ee5afb5233f0c3a5a48df0864f5b582b594c7121 Mon Sep 17 00:00:00 2001 From: Rolux Date: Wed, 7 May 2008 13:27:42 +0200 Subject: [PATCH] findRe now returns empty string instead of None --- oxutils/text.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/oxutils/text.py b/oxutils/text.py index c36ffa9..3660ef3 100644 --- a/oxutils/text.py +++ b/oxutils/text.py @@ -8,10 +8,9 @@ def findRe(string, regexp): result = re.compile(regexp, re.DOTALL).findall(string) if result: return result[0].strip() - return None + return '' -def findRegexp(string, regexp): - return findRe(string, regexp) +findRegexp = findRe def findString(string, string0='', string1 = ''): """Return the string between string0 and string1.