Using regex: Strip all HTML tags except links and<p> and </p> on newest questions tagged regex – Stack Overflow

I am trying to write a regular expression to strip all HTML with the exception of links and <p> and </p>.

Now , I can just remove all HTML tags except links, but I have no idea how to keep the links tag and p tags in the same time ?

By the way, somebody can recommend some books about how to learn regular expression ?

See Answers


source: http://stackoverflow.com/questions/11858350/strip-all-html-tags-except-links-andp-and-p
Using regex: using-regex



online applications demo