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:
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?
We can update the regex to ^(.+)?(?:[\W\s]*)?(\+\+|\-\-)(?: (?:for|because|cause|cuz) (.+))?$ which would result in haha erin has 1 points (because hubot doesn't know the difference between haha erin and patrick connolly, we'd need to allow all characters.)
^(.+)?(?:[\W\s]*)?(\+\+|\-\-)(?: (?:for|because|cause|cuz) (.+))?$
haha erin has 1 points
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: "dogs with poofy tails"++)
"dogs with poofy tails"++
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 regex, bro
Annotated the regex as suggested in #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.