Question

RegEx to strip all HTML from rich text field

  • 5 December 2023
  • 1 reply
  • 50 views

Badge +1

Hi,

We are creating a PDF using Document Generator in NAC. The problem is when we add a Rich Text field from the SharePoint item all the HTML is printed as well. I know we will need to use a regex to remove the HTML. Does anyone have any idea on what the pattern should be or if there is a different approach I should follow?

 

Thanks Chris


1 reply

Userlevel 5
Badge +13

Is there a specific need or reason why you are using a Rich Text field in your list? Would it be possible to use a Plain Text field instead? That would eliminate HTML in the text that you are seeing.

Reply