preg_match to strip link from content
I am using this bit of code to identify certain links within my content and swap them for another link.
The problem with it is that it replaces everything between the tags what I want to do is replace ONLY the url and leave the rest intact.
$re1='(\\[url\\])'; # Square Braces 1
$re2='.*'; # Non-greedy match on filler
$articleContent .=preg_replace("/".$re1.$re2.$re3."/i", '<a href="http://www.lesson-ology.com/content.php?whereto=416">Sign Up For Access</a>', $resource);
What would the reg_ex look like to accomplish this?