Created
January 20, 2021 19:24
-
-
Save bobdobbalina/fed59aa3d2274911aa112b64b0bc299f to your computer and use it in GitHub Desktop.
Javascript: Strip HTML tags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stripHTMLTags = str => str.replace(/<[^>]*>/g, ''); | |
stripHTMLTags('<a href="#">Me & you</a>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment