Fix deprecated preg_replace call
Fix tag search path