I saw this code snippet:
$(\"ul li\").text().search(new RegExp(\"sometext\", \"i\"));
and wanted to know if this can be extended to any str
if (str.toLowerCase().indexOf("yes") >= 0)
Or,
if (/yes/i.test(str))