hi,
i have a question about using special characters in a switch. I have searched in the Scripting documentation,internet, this forum,... but i can't make it work.
I have a switch that works:
switch(Message) {
case "questions": ChatWnd.SendMessage("sentence");
break;
...
but now i want to compare 'Message' to a string with for example 'the' in it.
like this: if Message = 'the best question ever'
how can i make the switch trigger this by the word 'question'?
switch(Message){
case "^.question.$": .... something like this doesn't work
i have read in the documentation that '.' matches any single character, '^' is the beginning of a string, '$' is the end of a string,...
but i can't make it work...