I want to replace tags in strings with preg_replace if there is a special attribute within the tag.
I want to replace
<link record:extend_events:6465 - internal-link><i>Some text</i></link>
into:
<a href="http://record?identifier=tx_extend_events&event=6465"><i>Some text</i></a>
Link tags should be skipped if there is no attribute like "record:extend_events" in it e.c.:
<link http://www.stack.com - external-link>Some text</link>