removing RTF tags RRS feed

  • Question

  •   I'm trying to remove the RTF tags from a string to use on Comapact FrameWork, but bumped into alot of issues.

    I tried first by making a richtextbox on the webserver with __Temp.RTF = myStrring; return __Temp.Text; but got File format is not valid.
    Then i finally found:


    this works if i trim the first and last char of the new string, but had to make a new project since its vb format on the Regex. could some one please translste the "filter" to C#?

    mr odin
    Monday, June 2, 2008 2:13 AM


  • tell me if this works:

    string t = "drrfty {rtgfg} i8";  
                t = Regex.Replace(t, "({)(.+?)(})|()(.+?)(\b)", string.Empty);  

    if not, give me a text in RTF format and i'll try to modify the regexp.
    Lucian Baciu, MSP, MCTS, http://studentclub.ro/lucians_weblog
    Sunday, June 8, 2008 9:46 AM