Strip RTF Tags to plain text


/ Published in: ASP
Save to your folder(s)

quick way to strip the rtf data so you have clean text


Copy this code and paste it in your HTML
  1. Function RemoveRTF(rtfText)
  2. set regexObject = New RegExp
  3. With regexObject
  4. .Pattern = "({\\)(.+?)(})|(\\)(.+?)(\b)"
  5. .IgnoreCase = True
  6. .Global = True
  7. End With
  8. RemoveRTF = Replace(regexObject.Replace(rtfText, ""),"}", "")
  9. End Function

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.