This is the regex used to match bug IDs in changeset comments. After a match is found, first the entire match,
then every grouping within the match is parsed as an integer. The first successful parse is used as the bug ID.
To match any number, use: [0-9]+
The bugzilla style of matching bug + number would be: bug ([0-9]+)
Note that the parens in this example are used to identify the bug number.