Hi,
Loving RiveScript (using the Javascript 1.1.4 lib), however I’m a bit puzzled by RiveScript’s behaviour and was wondering if this is a bug or not in the JavaScript lib implementation.
Given the following code,
+ (aa|bb|cc) [some optional] *
- TRIGGER
an input of “aaabcdefg” gives an output of “TRIGGER”.
whereas with the following code
+ (aa|bb|cc) *
- TRIGGER
an input of “aaabcdefg” does not match.
Is this a bug or is this expected behaviour.
There are similar issues with [*] preceding a (aa|bb|cc) block, causing abcdefgaa to match.
It’s causing things like ‘yo’ (as a greeting) to match ‘you’, amongst other things.
Would anyone have any thoughts on this?
Cheers,
Ivo