src/researches/findKeywordInFirstParagraph.js
function removeImagesFromText( text ) {
	const images = imageInText( text );
	const imageTags = matchStringWithRegex( text, "</img>" );

	if ( images.length > 0 ) {
		images.forEach( function( image ) {
			text = text.replace( image, "" );
		} );

		imageTags.forEach( function( imageTag ) {
			text = text.replace( imageTag, "" );
		} );
	}

	return text;
}
function removeImagesFromText( text ) {
	const images = imageInText( text );
	const imageTags = matchStringWithRegex( text, "</img>" );

	if ( images.length > 0 ) {
		images.forEach( function( image ) {
			text = text.replace( image, "" );
		} );

		imageTags.forEach( function( imageTag ) {
			text = text.replace( imageTag, "" );
		} );
	}

	return text;
}
Removes images from text.

@param {string} text The text string to analyze.

@returns {string} The text with images stripped away.