-
Notifications
You must be signed in to change notification settings - Fork 100
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
Only matches when word acted on is the first? #4
Comments
We can update the regex to Passive groups require that the character group matches, but does not end up in the resulting matches in the javascript array. I agree that the regex is getting a little out of hand. |
What about adding a toggle to only match single words if we choose? We are using this as a replacement for the karma command in #drupal channels on IRC, and multiple words is not something we want by default. As suggested elsewhere, allowing multiple words by quoting would cover that small number of cases where someone might want that (ex: Thoughts? |
I could see adding an option to match only single words (with multiple words needing to be quoted), but I don't think that should be the default. |
Ok, cool! I'll work on this sometime :) |
Annotated the regex as suggested in ajacksified#4
Is this a dupe of #2? |
They're both regex, but I think different issues to sort out. One is about ignoring (no match), and the other about misattribution of the plus'ed word (mismatching). Not even sure whether both are current issues though :) |
I think we can close this now, phrases are supported. |
Not sure if this is a bug or not. We used to be able to say things before the word we wanted to act on, and now this doesn't work. For example:
https://www.evernote.com/shard/s27/sh/4ac66797-e5b4-4144-913e-3a362400a211/f157a2c2d02642bc4871f8ef986bb067
Is this intentional?
Also, not familiar with "passive groups"
(?:...)
and how they work. Can we use a regex block and annotate it to explain some of this for others who are poking around?https://github.com/ajacksified/hubot-plusplus/blob/master/src/pluspplus.coffee#L31
The text was updated successfully, but these errors were encountered: