title: Javascript, string: test string for presence of sub-string that includes an asterisk (*)
body: <p>I'm doing a pretty basic string matching test as follows:</p>
  
  <pre><code>if(msList.indexOf(textChoice) != -1)
  </code></pre>
  
  <p>This works well <em>except that</em> 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.</p>
  
  <p>So how can I do this test so that any asterisks in the sub-string are treated as regular characters?</p>
  
  <p>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.  </p>