Posted By

cartercole on 08/24/10


Tagged

text RTFStripCleanPlain


Versions (?)

Strip RTF Tags to plain text


 / Published in: ASP
 

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

  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  

You need to login to post a comment.