Remove HTML Tags From a String

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Remove HTML Tags From a String

Post by Marcus Tettmar » Mon Jan 11, 2010 10:09 am

A quick and easy way to remove HTML tags from a string using RegEx:

Code: Select all

Let>Html=<P align=center><STRONG><FONT size=5>Hello World</FONT></STRONG><P><a here="test">Test link</a>

Let>pattern=<(.|\n)*?>
RegEx>pattern,Html,0,matches,numMatches,1,,plainText

MessageModal>plainText
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts