var ara = 'facebook.com';
$( "div:contains('"+ara+"')" ).each(function(){
var ekle = ' aaaaaaa >| ';
veri = $(this).html();
islenmis = veri.split(ara);
if(islenmis[0]=='http://www.'||islenmis[0]=='https://www.'||islenmis[0]=='http://'||islenmis[0]=='https://'||islenmis[0]=='http://'||islenmis[0]=='http://'+regex(.*)){
$(this).addClass('newClass');
}
})
我怎样才能找到检测到的可以是正则表达式我该怎么办?
<span>https://tr-tr.facebook.com</span>
<span>http://en-en.facebook.com</span>
<span>http://anysite.com/facebook.com</span>(no want find this result)
<span>https://www.facebook.com</span>