Skip to content

Instantly share code, notes, and snippets.

@muhittin
Created August 15, 2012 09:29
Show Gist options
  • Save muhittin/3358070 to your computer and use it in GitHub Desktop.
Save muhittin/3358070 to your computer and use it in GitHub Desktop.
strip_tags for Javascript
var text = '<div class="foo">bar</div>';
text.replace(/(<([^>]+)>)/ig,""); // Returns: bar
@dillinghamio
Copy link

Niceee

@mhcifci
Copy link

mhcifci commented Dec 23, 2018

Thanks boss)

@jonasdumas
Copy link

Youp youpi!

@santiagok986
Copy link

thanks 8 years after!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment