Regex Remove HTML Containers
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My input includes html containers and I need to remove them (characters and html commands) and leave just the actual text values:
<div>How do I remove the html tags?</div><br><div>Looking forward to the answer.</div>
Need to see: How do I remove the html tags? Looking forward to the answer.
Thank you.
Solved! Go to Solution.
- Labels:
- Preparation
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I took a stab at this for you using your sample container entry.
I added a space between the text. You might want to have a PIPE delimiter left behind instead of the space. Please try this and let me know if it helps.
Trim( Regex_Replace( Regex_Replace([HTML_Container],"<.*?>",'|'), "[|]{1,}", ' ') )
Trim( Regex_Replace( Regex_Replace([HTML_Container],"<.*?>",'|'), "[|]{1,}", '|') )
I've got the two sets of code (space and pipe replacements) above.
Trim() gets rid of any spaces at the front or end of your field.
Regex_Replace uses a wild card for all sets of data enclosed by <> and replaces them with a '|' pipe.
Regex_Replace uses a search for multiple pipes and replaces them with a single pipe.
At least for your test data it seems to work.
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @MarqueeCrew! Worked like a charm. You also gave me a mix of formula and regex to learn and use moving forward.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks! This was just what I needed to solve my problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you!! Just what I needed right now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thankyou so much for the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Amazing!
