My question is about a game (wordgame). Some answers come with accents. Is there a way to accept the answer even if the accent are not correctly done. ?
excuse my english :-/
exemple :
the answer is "élise"
i would like that "èlise" or "elise" would be accepted.
Use regular expressions, and make the answer mask like this:
(é|è|e)lise
A rougher way of doing it is to substitute the non-accented letter for the accented one:
# User's guess
set guess "èlïse"
regsub -all è|é|ê|ë $guess e guess
regsub -all ì|í|î|ï $guess i guess
regsub -all ò|ó|ô|õ|ö $guess o guess
regsub -all à|á|â|ã|ä|å|æ $guess a guess
# now guess doesn't have those accents..
# do the same for the other accents