I'm currently having some difficulties getting this below snippet to work. The current outcome is it replaces nothing.
I realize this particular question could also be solved using gettext, but I was looking a general example solving all of my str_replace questions at once.
add_filter( 'admin_print_scripts-index.php', 'wpse_replace_version_message' );
/**
* wpse_replace_version_message
*/
function wpse_replace_version_message( $html ) {
$html = str_replace( '<span id=\'wp-version-message\'>You are using <span class="b">WordPress 3.4-alpha-19904</span>', '', $html );
return $html;
}
