troubleshooting Question

Regular expression to remove HTML content

Avatar of JAndyEvans
JAndyEvansFlag for United States of America asked on
C#Regular Expressions
4 Comments1 Solution2182 ViewsLast Modified:
Currently, I use the following regex expression "<[^>]*>" to filter out html content from user comments.  For example, if the text submitted contains "<script language=javascript>alert('this is a test');</script>" the expression used in a replace function would return "alert('This is a test');".  I would like an expression that will remove anything that begins with a "<" and ends with a ">".  

Any Help would appreciated.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros