You are viewing limited content. For full access, please sign in.

Question

Question

Regex to remove HTML Tags?

asked on November 29, 2023

I'd like to use the Token Editor in Workflow to remove HTML tags from a Rich Text field I'm bringing in from Forms.

Does anyone have a regex that will accomplish this? Google returns sample code for accomplishing this in JS, but we're working in the v11 Modern Designer, and the JS code won't work in the Token Editor in Workflow.

Use case:
Since the v11 Modern Designer won't allow us to use JS to make multi-line fields auto-grow, we've been using Rich Text fields (that auto-grow automatically) instead. We sometimes use CSS to hide the toolbar so it just looks like a multi-line. This has worked well, but when we try to pull the field values into a report, it carries in all of the HTML formatting tags. I was hoping to use Workflow to flatten the fields and strip these out. Regex seemed like the best bet, but if anyone has another solution, that would be great, too!

 

2 0

Answer

SELECTED ANSWER
replied on November 29, 2023

Use "plaintext" to format the token and it will strip all formatting.

4 0
replied on November 29, 2023

That works perfectly and is exactly what I needed.

Thank you so much!!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.