It can automagically save all the questions with the answers if you supply the correct regular expression pattern (regex) for your trivia event.
It is working with Notice chat only and sending the answer to General chat by default.
In a few words, you’ll need to learn a little bit regex, there is no other choice
Direct download :
[Save as Link]
Lastest version on GitHub
Try xPluginUpdater to keep the track of my updates!
Important : Answering pattern needs to be in a group ( )
, check the following examples about how it works! everything else is up to you, easy to use and modify if it’s required, feel free to do it.
- Q:
How many letters has JellyBitz?
A:8. The winner is JellyBitz!
Question Pattern: (?i)How many[\s\S]*
- Case insensitive, whatever phrase having words “how many”
Answer Pattern: ([a-zA-Z0-9 ]*). The winner is [a-zA-Z0-9_]*!
- Case sensitive, Parenthesis to catch and save the answers, we guess the answer it’s the same format everytime.
- Q:
Question: What's the best movie of all times?
A:The Lord of the Rings. The winner is JellyBitz.
Question Pattern: (?i)(How many[\s\S]*|What's[\s\S])
- Case insensitive, whatever phrase having words “how many” and “what’s” covering above questions cases
Answer Pattern: ([a-zA-Z0-9 ]*). The winner is [a-zA-Z0-9_]*[.!]
- Case sensitive, Parenthesis to catch and save the answers, covering two cases; ending with char .
or !
- Q:
Captain ivy it's an evil pirate, do you know where it appears?
A:Great! the winner is JellyBitz. The answer is Asia
Question Pattern: (?i)(How many[\s\S]*|What's[\s\S]|where[\s\S]*)
- Case insensitive, explained already…
Answer Pattern: (([a-zA-Z0-9 ]*). The winner is [a-zA-Z0-9_]*[.!]|Great! the winner is [a-zA-Z0-9_]*. The answer is ([a-zA-Z0-9 ]*))
- Case sensitive, covering two answering formats…