$text = preg_replace('#\[mtg]([0-9 a-z]*?)\[/mtg]#si', '\1', $text); return $text;