// Start IMG to URL BBCode Converter if ($this->contains_bbcode_img_tags($message)) { $message = preg_replace_callback( '#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iU', function ($matches) { return $this->handle_bbcode_url(str_replace('\"', '"', $matches[1]), ''); }, $message ); } // End IMG to URL BBCode Converter