RegExp help

I am trying to do a search that locates the string anywhere in the RSS feed and is case insensitive. I have it working fine when it’s still case insensitive but when I throw in the /i I break it.


        pattern=new RegExp("/\\b"+kSearch+"\\b/i");
        search =  myXML.channel.item.(pattern.exec(title));