There are multiple answers to a question, is it possible to check if part of a given answer is correct using regular expressions and JavaScript?
For example, the English phrase "I think about it" can be translated into Esperanto "Mi pensas pri tio" or "< em>Mi pensas al tio”. When the user writes the answer, the input text should turn red if there are any errors. For example, entering "Mi pensas" is correct.
Is it possible to use a pattern like "Mi pensas (pri|al) tio" instead of looping through all possible answers?
If I understand correctly, this is the approach I would take:
When the text is wrong, you can set it to red.