~scompall/+junk/julython-commit--mainline

« back to all changes in this revision

Viewing changes to julythoncommit/util.py

  • Committer: Stephen Compall
  • Date: 2013-07-01 01:38:30 UTC
  • Revision ID: scompall@nocandysw.com-20130701013830-rfmiayc3pv9dcf7a
A little better regex

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
            return otherwise
37
37
    return fsafe
38
38
 
39
 
_parse_author_re = re.compile(ur'(\S(?:.*?\S)?)\s*(?:<(.+)>)')
 
39
_parse_author_re = re.compile(ur'(\S(?:[^<]*(?!<)\S)?)\s*(?:<(.+)>)?')
40
40
 
41
41
def parse_author(auth):
42
42
    """Split a string like "John Doe <john@doe.org>" into name and