Hi,
I created a simple quiz program and I am trying to figure out a method to return 3 types of answer's using regex. The 3 answers would be either fully correct, correct (but spelling error) and partially correct, but still awarded being correct.
So for an example, the three strings will be correct from the method comparing to the String "Elephants" : 1. "Elephants", 2. "Elephents", 3. "Elephant".
The 1st string is fully correct, so would return "Correct Answer".
The 2nd string is correct but spelling error ('a' instead of an 'e'), so will return "Correct although spelled Elephants".
The 3rd string is partially correct (No 's' at the end), but will return "Answer accepted"
Could anyone figure out the three types of Regex expressions I could use for this method?
Thanks much appreciated.