php匹配网址的正则 几乎可以匹配任何网址

网络编程 发布日期:2024/10/11 浏览次数:1

正在浏览:php匹配网址的正则 几乎可以匹配任何网址

比较简单的

$str = '';
$isMatched = preg_match('/^^((https|http|ftp|rtsp|mms)"htmlcode">
^((https"htmlcode">
<script type="text/javascript"> 
function IsURL(urlString) 
{ 
regExp = /^((https"is a url"; 
else 
return "not a url"; 
} 
url = ""; 
alert(IsURL(url)); 
</script>