$body = preg_replace_callback('/(?<=^|\s)@([a-z0-9_-]+)(?=$|\s|:|.)/i', function ($matches) {
            $target = User::name($matches[1])->first();

            if ($target) {
                return '[@' . str_replace('_', '\_', (string) $target->name) . '](/u/' . $target->name . ')';