- foreach ($old_tags as $index => $old_tag) {
- if (strcmp($old_tag, $new_tag) == 0) {
- unset($old_tags[$index]);
- break;
+ if (preg_match_all('/([#@!])\[url\=([^\[\]]*)\]([^\[\]]*)\[\/url\]/ism', $new_tag, $results, PREG_SET_ORDER)) {
+ foreach ($results as $tag) {
+ Tag::removeByHash($item['uri-id'], $tag[1], $tag[3], $tag[2]);