package com.ztx.club.util; import java.io.UnsupportedEncodingException; import java.util.Hashtable; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.ztx.util.web.ParamUtils; public class StringUtils { private static final String[] regexUBB = new String[] { "\\[/url\\]", "\\[/email\\]", "\\[/color\\]", "\\[/size\\]", "\\[/font\\]", "\\[/align\\]", "\\[b\\]", "\\[/b\\]", "\\[i\\]", "\\[/i\\]", "\\[u\\]", "\\[/u\\]", "\\[list\\]", "\\[list=1\\]", "\\[list=a\\]", "\\[list=A\\]", "\\[\\*\\]", "\\[/list\\]", "\\[indent\\]", "\\[/indent\\]", "\\[code\\]", "\\[/code\\]", "\\[quote\\]", "\\[/quote\\]", "\\[table\\]", "\\[tr\\]", "\\[td\\]", "\\[/tr\\]", "\\[/td\\]", "\\[/table\\]" }; private static final String[] replacementUBB = new String[] { "", "", "", "", "", "
", "
", "", "
", "", "
", "", "
", "
", "
", "
<textarea name="codes" id="codes" rows="12" cols="65">", "</textarea>
<input type="button" value="运行代码" onclick="RunCode()"> <input type="button" value="复制代码" onclick="CopyCode()"> <input type="button" value="另存代码" onclick="SaveCode()"> 提示:您可以先修改部分代码再运行
", "
", "
", "", "", "", "", "
" }; private static final String[] replacementHTML = new String[] { "[/align]", "[b]", "[/b]", "[i]", "[/i]", "[u]", "[/u]", "[list]", "[list=1]", "[list=a]", "[list=A]", "[*]", "[/list]", "[indent]", "[/indent]", "[code]", "[/code]", "[quote]", "[/quote]", "[table]", "[tr]", "[td]", "[/tr]", "[/td]", "[/table]" }; private static final String[] regexHTML = new String[] { "