Thanks for this
Pull-Request has been merged by pingou
nitpick: .\s and .\s? are equivalent to . perhaps you meant: .\s+
I see the pattern was copied from existing patterns.
With things as they are, you can match things like the following:
p = re.compile(r'.*\s*merge?[sd]?:?\s*?#(\d+)', re.I) p.match('nowhitespacemerge: #45').groups() ('45',) p.match('This commit unmerges #45').groups() ('45',)
PR incoming...