UBB code transform HTML code

xiaoxiao2021-03-06  113

Public Static String Ubbdecode (String Str)

{

Str = HTMLENCODE (STR);

Str = regex.replace (STR, @ "/ [url] (? . ?) / [/ url]", " $ {name} ", regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (STR, @ "/ [email] (? . ?) / [/ email]", " $ {name} ", regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (STR, @ "/ [FLASH] (? . ?) / [/ flash]", "

[/ u5168 / u5c4f / u67e5 / u770b] ", regexoptions.compiled | regexoptions.ignorecase; str = regex.replace (str, @" / [dir = (? [0 -9] ?), (? [0-9] ?)] (? . ?) / [/ Dir] ", < Param name = src value = $ {url}> ", regexoptions.Compiled | RegexOptions.Ignorecase;

Str = regex.replace (str, @ "/ [rm = (? [0-9] ?), (? [0-9] ?)] (? . ? ) / [/ rm] ","
", regexoptions.compiled | regexoptions.ignorecase; str = regex.replace (str, @" / [mp = (? [0-9] ?), (? [0-9] ?)] (? . ?) / [/ mp] "" ", Regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (STR, @ "/ [qt = (? [0-9] ?), (? [0-9] ?)] (? . ? ) / [/ qt] "," ", regexoptions.compiled | regexoptions.ignorecase; str = regex.replace (STR, @" / [img] (? < IMG>. ?) / [/ img] "," ", regexoptions. Compiled | regexoptions.ignorecase;

Str = regex.replace (STR, @ "/ [color = (? . ?)] (? . ?) / [/ color]", " $ {text} ", regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (str, @ "/ [face = (? <" "(? . ?) / [/ face]", " $ {text} ", regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (str, @ "/ [down = (? . ?) / [/ down]", " $ {text} ", regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (STR, @ "/ [align = (? . ?)] (? . ?) / [/ align]", "

$ {text} ", regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (str, @ "/ [quote] (? . ?) / [/ quote]", "

$ {text} ", regexoptions.compiled RegexOptions.ignoreCase; str = regex.replace (str, @ "/

(? . ?) / "," $ {text} ", regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (STR, @ "/ [u] (? . ?) / [/ u]", " $ {text} ", regexoptions.compiled | regexoptions. Ignorecase;

Str = regex.replace (str, @ "/

(? . ?) / "" $ {text} ", regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (STR, @ "/ [size = (? . ?) / [/ size]", " $ {text} ", regexoptions.compiled | regexoptions.ignorecase;

Str = regex.replace (str, @ "/ [/ *] (? . ?) / [// *]", "

  • $ {text} ", regexoptions.compiled | Regexoptions.ignorecase;

    Str = regex.replace (str, @ "/ [list] (? . ?) / [/ List]", "

      $ {text} ", regexoptions.compiled | RegexOptions. Ignorecase;

      Return regex.replace (STR, @ "/ [list = (? . ?) / [/ list]", " $ {text} ", regexoptions.compiled | regexoptions.ignorecase;

      }

  • 转载请注明原文地址:https://www.9cbs.com/read-99934.html

    New Post(0)
    CopyRight © 2020 All Rights Reserved
    Processed: 0.049, SQL: 9