Open rblanc99 opened 4 years ago
i think that because rivescript uses a simplified version of regex, this feature would be hard to support. the simpler form makes it really easy for non-tech authors to use, but means more sophisticated regex features are missing. there was some thought of adding true regex but not much requests for that right now. https://github.com/aichaos/rivescript-js/issues/320
Perhaps an alternative way to detect questions is to look at the first word of the message?
+ (who|what|how|why|when) *
- {topic=questions}{@<star1> <star2>}
Alternatively, your bot code can look for the ? mark and set a user variable before calling reply().
I am using Rivescript in a Node project.
I want to make the bot recognize questions, so i would like to do something like
But unfortunately, the bot can't handle the "?", I get a
Triggers may only contain lowercase letters, numbers, and these symbols: ( | ) [ ] * _ # { } < > = /
error.I would very much appreciate that feature, thanks !
(Maybe this issue belongs in the rivescript repo and not rivescript-js, wasn't sure about it, sorry)