30 seconds of code

  Back to Home

stripHTMLTags

stringutilityregexpbeginner

Removes HTML/XML tags from string.

Use a regular expression to remove HTML/XML tags from a string.

const stripHTMLTags = str => str.replace(/<[^>]*>/g, '');