php匹配url的正则表达式
php匹配url的正则表达式 ```{php}//https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)? //PHP Example: Automatically link URL#39;s inside text. $text = preg_replace(#39;@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?
//https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)? //PHP Example: Automatically link URL's inside text. $text = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '<a href="$1">$1</a>', $text);
- 上一篇:php表单验证代码
- 下一篇:PHP 对 png 图像进行缩放,支持透明背景
精彩图集
精彩文章