I have two string I want to check if substring of one variable into another variable below is the code snippets.
var val1 = "www.google.com , www.yahoo.com , www.msn.com, in.news.yahoo.com";
var val2 = "in.news.yahoo.com/huffington-post-removes-sonia-gandhi-rich-list-103404344.html";
//if val1 does not contains val2 I want to show popup. I tried val1 .toLowerCase().indexOf(val2 .toLowerCase()) but it doesn't work it always return -1.
can any one suggest me how can I put if condition?
val2is a substring ofval1, not any substring ofval2is a substring ofval1.