How do I remove all hyperlinks that begin with a #?

Inspired by @Samuel Elh, but accounting for single or double quoted attributes and a href that might not be the first attribute of an anchor:

function wpse_227315_strip_hyperlinks( $content ) {
    preg_match_all( '!<a[^>]*? href=[\'"]#[^<]+</a>!i', $content, $matches );

    foreach ( $matches[0] as $link )
        $content = str_replace( $link, strip_tags( $link ), $content );

    return $content;
}

add_filter( 'the_content', 'wpse_227315_strip_hyperlinks' );

Note this will completely remove the link node/HTML from the post content. This will replace the HTML link with just the inner text.