Created
February 21, 2014 18:15
-
-
Save bensternthal/9139934 to your computer and use it in GitHub Desktop.
I want to get the list of bugs mentioned in a commit message! Essentially the same regex used here but in Javasctipt: https://github.com/github/github-services/blob/master/lib/services/bugzilla.rb#L139
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I hate regex. Here is what I have so far. | |
var testString = "fix bug 3524"; | |
var regex1 = new RegExp("/(?:close|fix|address)*?(?=(?:ticket|bug|tracker item|issue)*?)/","i"); | |
var result = regex1.exec(testString); | |
if (result) { | |
console.log(result); | |
} else { | |
console.log('no match!'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment