title: Google Sheet Script - Find Value in Col and Delete Row
body: <p>So I'm working on a script to search my Google Sheet for a value and then delete the row, so far I have this:</p>
  
  <pre><code>function sort() { 
    var sheet = SpreadsheetApp.getActiveSheet(); 
    var rows = sheet.getDataRange(); 
    var numRows = rows.getNumRows(); 
    var values = rows.getValues(); 
    var rowsDeleted = 0; 
  
    for (var i = 0; i &lt;= numRows - 1; i++) { 
      var row = values[i]; 
      if (row[0] == 'test') { 
        sheet.deleteRow((parseInt(i)+1) - rowsDeleted); rowsDeleted++; 
      } 
    } 
  }; 
  </code></pre>
  
  <p>So what I got so far is that I can exact match the text, but I want to find all cols which contains "test" and not only "test". So it will delete rows with data like:</p>
  
  <ol>
  <li>This is a test </li>
  <li>Test me again</li>
  <li>ThisTestIsNotWorking</li>
  </ol>
  
  <p>Any solution :)?</p>