I have a code that verifies phrases that the user types and was tried more without much success, make a code using RegExp to verify that the user entered a certain phrase without or with variations of words. / p>
Example: "I use Facebook" or "I use Google"
The two sentences are almost identical with only one variation of the word.
I wanted this code to verify that the user entered this phrase with possible default variations.
I do not understand much about, but I think it would look something like this:
"Eu uso o google".exec( /^Eu uso o [google, facebook]$/i );