I'm trying to parse links using php with a structure such as [google](http://google.com)
, and so far I've got this:
"/\[(.+?)\]((.+?\))/is"
The only part I can't get to work is the part with the parenthesis ')'.
Any help would be great!
[edit]
@jari - This is part of the code:
$find = array(
"@\n@",
"/[**](.+?)[**]/is",
"/\[(.+?)\]\((.+?)\)/is"
);
$replace = array(
"<br />",
"<strong>$1</strong>",
"<a href\"$1\" target=\"_blank\" rel=\"no follow\"></a>"
);
$body = htmlspecialchars($body);
$body = preg_replace($find, $replace, $body);
return $body;