This is the regex used to match case 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 case ID.
To match any number, use: [0-9]+
The Fogbugz style of matching case + number would be: CASE-([0-9]+) Note that the parenthesis in this example are used to identify the case number.