I'm trying to integrate Fogbugz issue tracking with TeamCity and I'm struggling to get the regex correct. We usually mark the case in the check in comment like "BugzID: 1234" but I'd like to get a regex that doesn't care about capitalization, or if the ":" is there. There can also be text before or after the bugzid.
I tried to use: \b(?(review|case|bug[zs]?(\s| )(id)?:?)s?(\s| )([#:; ]| )+)((([ ,:;#]|and)*)(?\d+))+
which I got from: help.fogcreek.com/7772/link-fogbugz-cases-to-changesetscommits-in-kiln
but it doesn't seem to be working correctly. The link it generates has "BugzID:" for the ID, which should be "1234".
Can any regex experts help?
Thanks!