I have custom html tags in my apps, it looks like this: \[code\]<wiki href="http://stackoverflow.com/questions/3852402/articletitle">Text</wiki>\[/code\] and want it replaced to be like this: \[code\]<a href="http://myapps/page/articletitle">Text</a>\[/code\]. How I can do that in PHP?