I'm doing a pretty basic string matching test as follows:
if(msList.indexOf(textChoice) != -1)
This works well except that occasionally the sub-string I'm looking for (textChoice) ends with an asterisk. Then I end up getting false matches because the asterisk in the string is interpreted as an operator, not a character in the string.
So how can I do this test so that any asterisks in the sub-string are treated as regular characters?
PS. I know the simple answer is "Don't include asterisks in your sub-string" but they're in the data I'm working with--I can't get rid of them.