Question: I have problem use array keyword and non-casesensitive search in innerHTML
I am trying write Greasemonkey JS which will remove tags which are containning keywords 

```
 function removebadcriptts() {

 var  scriptslinks = ['jumper.php','redirect.php'];
 var theLinks = document.getElementsByTagName("script");

 for (var i=0; i<scriptslinks.length; i++)
 {
   for (var j=0;j<theLinks.length;j++)
   {
     if (theLinks[i].innerHTML.search("/"+scriptslinks[i]+"/i/")  !== -1)
      /keyword/i = regular expression for non-case is not working
     {     
      console.error("InnerHTML Keyword found ");      
      theLinks[j].parentNode.removeChild(theLinks[j]);
     } 
     else
     {
       console.error("InnerHTML Keyword  not found ");   
     }
   }
 }
}

```

Can anybody help howto remove and match this kind of scripts and remove from WEBpage also howto catch scripts which are injecting scripts into loaded webpage

Answer: 
Do you mean

```
 function removebadcriptts() {

 var  scriptslinks = ['jumper.php','redirect.php'];
 var theLinks = document.getElementsByTagName("script");

 for (var i=0; i<scriptslinks.length; i++)
 {
   for (var j=0;j<theLinks.length;j++)
   {
     if (theLinks[i].src.toLowerCase().indexOf(scriptslinks[i]) !== -1)
     {     
      console.error("SRC Keyword found ");      
      theLinks[j].parentNode.removeChild(theLinks[j]);
     } 
     else
     {
       console.error("SRC Keyword  not found ");   
     }
   }
 }
}

```
Try using .Match, and i believe the regex would have to look like:

```
/scriptslink[i]/i

```