Fix "stg mail" address parsing for hyphen
[stgit] / stgit / commands / mail.py
index 9f4b3d1..a8819b5 100644 (file)
@@ -117,7 +117,7 @@ def __parse_addresses(string):
     """Return a two elements tuple: (from, [to])
     """
     def __addr_list(string):
-        return re.split('.*?([\w\.]+@[\w\.]+)', string)[1:-1:2]
+        return re.split('.*?([-\w\.]+@[-\w\.]+)', string)[1:-1:2]
 
     from_addr_list = []
     to_addr_list = []