I’d like to know how to convert basic rivescripts into regular expressions. I tried to make some regex examples, but some regex failed to capture the correct values:
example 1: “what color is my bright red car” (https://regex101.com/r/WT2Va1/1)
what color is [my|your|his|her] (bright red|blue|green|lemon chiffon) *
what color is(?: my| your| his| her)?(?: bright red| blue|g reen| lemon chiffon)(?: (.+))
example 2: “he told me to say thanks” (https://regex101.com/r/q0ea4m/1)
[*] told me to say *
(?:(.+) )?told me to say(?: (.+))
example 3: “i know what cars are!” (https://regex101.com/r/RKAd04/1)
[i|you] [know] what * [is|are]!
(?:i |you )?(?:know )?what(?: (.+))(?: is| are)?!
I somehow corrected the first and second regexes, but the last regex captured the wrong answer.
Are there any tools that help tranform rivescript in to regex?