Regular expressions for issue connector

Hi there,

I’m trying to set up an issue connector for our Fogbugz system and have some problems with the regular expression. Our subversion checkin comments always start with “BUG {casenumber}:” or “IMP {casenumber}:” and I’d like to extract the case number from the comments. The comments may have multiple lines with multiple case numbers.

So far I set up this regular expression:

(?i)[(IMP|BUG|BUGFIX)] (?\d+)

This works in most cases but it also validates with Subversion’s default merge comments. From

Merged revision(s) 10794-10808 from trunk

the 10794 is extracted as an id. Am I missing something?

Regards

Kay Zumbusch

I got it working with some help of two colleagues. We changed the regular expression to

(?i)(?:IMP|BUG|BUGFIX) (?\d+)

Hi Kay,

Great that you worked it out. The square brackets matches any of the characters within, so this was matching the ) in "Merged revision(s) 10794-10808 from trunk."

Just a note for anyone looking at this, the forum was not showing the full regex. It should be as follows:

(?i)(?:IMP|BUG|BUGFIX) (?<id>d+)

http://regexstorm.net/tester is a great resource for testing .Net regular expressions for use with Contiuna