如何在php中使用preg_match处理本文中提到的正则表达式?
<?php
preg_match("\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))/i", $text, $matches);
print_r($matches);
?>
Run Code Online (Sandbox Code Playgroud)
使用上面的代码我收到以下错误:
Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash...
Run Code Online (Sandbox Code Playgroud)