google apps script - Find text in string, case insensitive -


i have made small script check expenses. in description term. search within string (like supermarket brand). unfortunately, can check case sensitive. how fix this? want search within string independent of case. search terms can upper of lower case, easy adjust.

for (i in uitgaven) {     for(n=0;n<data.length;++n)// iterate row row , examine data in column    {        if(data[n][3].tostring().match(uitgaven[i][0])==uitgaven[i][0]){ data[n][4] = uitgaven[i][1]    };  } 

just substitute this:

data[n][3].tostring().touppercase()===uitgaven[i][0].touppercase() 

for this:

data[n][3].tostring().match(uitgaven[i][0])==uitgaven[i][0] 

Comments

Popular posts from this blog

PHP while loop dynamic rowspan -

timer - Java TimerTask cancel -

android - How to read a column value in parse.com without accessing an object or a pointer -