Program to remove HTML tags from a given String | Function to remove the HTML tags from the given string ; Use regex_replace function in regex to erase every tags enclosed in < > ; Print string after removing tags ; Given String ; Function call to print the HTML string after removing tags
function RemoveHTMLTags ( s ) { const pattern = new RegExp ( " \\ \\ " ) ; s = new String ( s ) . replace ( pattern , " " ) ; document . write ( s ) ; return ; } let str = " " ; RemoveHTMLTags ( str ) ;