Spring Posted October 28, 2011 Share Posted October 28, 2011 I'm trying to alow users to reference links, but I'm stumped. $com = preg_replace("/(^|<<)(<<[^<]*[0-9])/", "\\1<a href = #".$com.">#$com</a>\\2</div>", $com); If I typed <<#123 I would get: #<<123<<123 and it would link to <<123 The output I'm looking for is <<#123 and have it link to #123 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.