Url Matching using Gruber's regex in PHP

blackpen

New Member
how do I get the regex mentioned in this article working with preg_match in php?\[code\]<?phppreg_match("\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))/i", $text, $matches);print_r($matches);?>\[/code\]Using the code above I get the following error:\[code\]Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash...\[/code\]
 
Back
Top