Remove all links in a post content of wordpress

Edit functions.php,  add the following code:

add_filter('the_content', 'removelink_content',1);

function removelink_content($content = '')
{
    preg_match_all("#<a(.*?)>(.*?)</a>#i",$content, $matches);
    $num = count($matches[0]);for($i = 0;$i < $num;$i++){
        $content = str_replace($matches[0][$i] , $matches[2][$i] , $content);
    }
    return $content;
}