Use regular expressions to retrieve pull request numbers

- Use re.search when parsing git log
- Use re.match when parsing --rebased comments
- Add test with trailing period to TestUnrebasedPRs