Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing default regexes produce random matches #33

Closed
silkentrance opened this issue Jan 8, 2015 · 2 comments
Closed

Existing default regexes produce random matches #33

silkentrance opened this issue Jan 8, 2015 · 2 comments

Comments

@silkentrance
Copy link

While working on #24, I found that while all existing test cases do actually work, the underlying regular expressions, especially the default ones, generate rather random results. See below.

Considering the following output of regular expressions and their respective matches

regex: "/^(.*)fixes #\d+:?(.*)$/i":"Fix 1 2 3."
regex: "/^(.*)fixes #\d+:?(.*)$/i":"Fix 4 5 6."
regex: "/^(.*)fixes #\d+:?(.*)$/i":"Fix 7 8 9."
regex: "/^(.*)closes #\d+:?(.*)$/i":"Feature 1 2 3."
regex: "/^(.*)closes #\d+:?(.*)$/i":"Feature 4 5 6."
regex: "/^(.*)closes #\d+:?(.*)$/i":"Feature 7 8 9."

it would seem that the matches produced by the default regular expressions are lucky at best.

Perhaps reworking these regular expressions would be a wise move?

@mischah
Copy link
Collaborator

mischah commented Jan 9, 2015

I don’t get it 😑

This is the default featureRegexdefined over here:
http://refiddle.com/1v55

And this is the default fixRegex defined over here:
http://refiddle.com/1v56

I guess they both could be simplified but they seem to work solid for me.

@silkentrance
Copy link
Author

Well, I guess it must have been very late. In fact, the matches should have included the closes and fixes parts as well, somehow they got cut off. That is why I wondered.
Closing as invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants