From: Catalin Marinas Date: Thu, 16 Nov 2006 19:45:31 +0000 (+0000) Subject: Fix the mail import regex to remove the [...PATCH...] text X-Git-Tag: v0.14.3~421 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/dfeeba67c784985055ea963558d6fb65824971f5 Fix the mail import regex to remove the [...PATCH...] text With the addition of a prefix to the [PATCH] string, the mail importing regex was no longer able to remove it. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py index 9c97498..cc160cc 100644 --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -166,7 +166,7 @@ def __parse_mail(msg): # remove the '[*PATCH*]' expression in the subject if descr: - descr = re.findall('^(\[[^\s]*[Pp][Aa][Tt][Cc][Hh].*?\])?\s*(.*)$', + descr = re.findall('^(\[.*?[Pp][Aa][Tt][Cc][Hh].*?\])?\s*(.*)$', descr)[0][1] descr += '\n\n' else: