var string = $.trim("How are you ? are you fine ?");
var part = $.trim("How are you ? are you fine ?");
var SearchResult = string.match(part);
if (SearchResult != null && part!="") {
alert("hello1");
}
string = $.trim("How are you ? a");
part = $.trim("How are you ? a");
SearchResult = string.match(part);
if (SearchResult != null && part!="") {
alert("hello2");
}
string = $.trim("How are you ?");
part = $.trim("How are you ?");
SearchResult = string.match(part);
if (SearchResult != null && part!="") {
alert("hello3");
}
Only the third alert works; what is the problem in first and second string ?