public static function stripSocials($text, $replaceWith = '')
    {
        $text = preg_replace('/(?<=\s|^|>)@[^\s<]+/u', $replaceWith, $text);
        $text = preg_replace('/(?:[^\s>]+\.)?facebook.com\/[^\s<]+/u', $replaceWith, $text);

        return $text;
    }
public static function stripSocials($text, $replaceWith = '')
    {
        $text = preg_replace('/(?<=\s|^|>)@[^\s<]+/u', $replaceWith, $text);
        $text = preg_replace('/(?:[^\s>]+\.)?facebook.com\/[^\s<]+/u', $replaceWith, $text);

        return $text;
    }
public static function stripSocials ( $ text , $ replaceWith = '' ) { $ text = preg_replace ( '/(?<=\s|^|>)@[^\s<]+/u' , $ replaceWith , $ text ) ; $ text = preg_replace ( '/(?:[^\s>]+\.)?facebook.com\/[^\s<]+/u' , $ replaceWith , $ text ) ; return $ text ; }
Remove social hints in text.

This method can remove these types:
- <code>@test</code> (twitter)
- <code>facebook.com/test</code> (facebook)

@param string $text
@param string $replaceWith [optional]

@return string
Remove social hints in text .