title: How to find text in a string using google script?
body: <p>I tried indexOf(), findText() and other few methods for finding a string pattern in a text in google app script. None of the above method works.</p>
  
  <pre><code>var str="task is completed";
  </code></pre>
  
  <p>I'm getting this string from google spreadsheet.</p>
  
  <p>I just want to find whether the above string contains a string "task" .</p>