Fix the mail import regex to remove the [...PATCH...] text
authorCatalin Marinas <catalin.marinas@gmail.com>
Thu, 16 Nov 2006 19:45:31 +0000 (19:45 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 16 Nov 2006 19:45:31 +0000 (19:45 +0000)
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 <catalin.marinas@gmail.com>
stgit/commands/imprt.py

index 9c97498..cc160cc 100644 (file)
@@ -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: