public static function stripLinks($text, $replaceWith = '')
    {
        $text = preg_replace('/(?:(?:[^\s\:>]+:)?\/\/|www\.)[^\s\.]+\.\w+[^\s<]+/u', $replaceWith, $text);
        $text = preg_replace('/[^\s\.>]+\.[a-z]{2,}\/[^\s<]+/u', $replaceWith, $text);

        return $text;
    }
public static function stripLinks($text, $replaceWith = '')
    {
        $text = preg_replace('/(?:(?:[^\s\:>]+:)?\/\/|www\.)[^\s\.]+\.\w+[^\s<]+/u', $replaceWith, $text);
        $text = preg_replace('/[^\s\.>]+\.[a-z]{2,}\/[^\s<]+/u', $replaceWith, $text);

        return $text;
    }
public static function stripLinks ( $ text , $ replaceWith = '' ) { $ text = preg_replace ( '/(?:(?:[^\s\:>]+:)?\/\/|www\.)[^\s\.]+\.\w+[^\s<]+/u' , $ replaceWith , $ text ) ; $ text = preg_replace ( '/[^\s\.>]+\.[a-z]{2,}\/[^\s<]+/u' , $ replaceWith , $ text ) ; return $ text ; }
Remove links in text.

This method can remove these types:
- <code>http://test.de</code> (with every protocol)
- <code>//test.de</code> (without protocol)
- <code>www.test.de</code> (with www subdomain)
- <code>www.test.de/test/test.htm?test=1&test2=2</code> (with path, file and param suffix)
- <code>test.de/sub</code> (with path)

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

@return string
Remove links in text .