0
var getValue="</p>Workingcode.in</p>"
 getValue.replace( /(<([^>]+)>)/ig, '');

Output:

Workingcode.in

How to Remove HTML tags from String ServiceNow
Working Code Asked question September 14, 2023