Stripping URLs & Email from post submissions

You can use the_content (Click here for more info) hook to change the content while rendering the post/page.

This will be triggered when Post is being read from Database. So post content will not be changed in database but only filtered while rendering.

add_filter( 'the_content', 'remove_email_and_url_from_post' );
function remove_email_and_url_from_post( $content ) {

    // Check if we're inside the main loop in a single post page.
    if ( is_single() && in_the_loop() && is_main_query() ) {

        // For emails
        $pattern = "/[^@\s]*@[^@\s]*\.[^@\s]*/";
        $replacement = "[removed]";
        $content = preg_replace($pattern, $replacement, $content);

        // For urls
        $pattern = "/[a-zA-Z]*[:\/\/]*[A-Za-z0-9\-_]+\.+[A-Za-z0-9\.\/%&=\?\-_]+/i";
        $replacement = "[removed]";
        $content = preg_replace($pattern, $replacement, $content);

    }

    return $content;
}

Or same way you can use content_save_pre hook.

This will be triggered when post is being saved to database. So this will actually remove the filtered content from post and then save it to the database.

function remove_email_and_url_from_post( $content ) {
    return $content;
    $pattern = "/[^@\s]*@[^@\s]*\.[^@\s]*/";
    $replacement = "[removed]";
    $content = preg_replace($pattern, $replacement, $content);

        // For urls
    $pattern = "/[a-zA-Z]*[:\/\/]*[A-Za-z0-9\-_]+\.+[A-Za-z0-9\.\/%&=\?\-_]+/i";
    $replacement = "[removed]";
    $content = preg_replace($pattern, $replacement, $content);
    return $content;
}
add_filter( 'content_save_pre', 'remove_email_and_url_from_post', 10, 1 );