Replace plugin HTML to single text using hooks

I have a plugin that has HTML div that displays like /div class="llms-setting-group "p class="llms-label"General Settings(?s).*\/table\/div/ now I want to replace this to simple hello users. I tried with gettext but I have no success in it. Here is code block that I have used:

function my_text_strings( $translated_text, $text, $domain ) {

if ( $translated_text == '/div class="llms-setting-group "p class="llms-label"General Settings(?s).*\/table\/div/') {
$translated_text = 'Hello Users!';
}

return $translated_text;
}
add_filter( 'gettext', 'my_text_strings', 20, 3 );

Topic xgettext hooks plugins Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.