我自己写了一个正则表达式,
这个是替换所以HTML标签,非贪婪的,多行的。
如果我想替换得到所以非HTML标签,
我的代码就只能是这样,先找打HTML标签,然后将标签替换掉。
能不能直接找到非HTML标签呢。。
生成可在 deepbi 沙箱 iframe 内运行或作为独立文件运行的交互式 HTML 页面,使用 `window.deepbi` JS SDK 实现数据查询、空间管理、文件浏览及用户操作。当用户提出以下需求时启用该能力: - 创建 KPI 仪表盘、数据表格、文件浏览器、成员列表、管理页面; - 明确要求“转成 dhtml”、“转译成 HTML”、“把 XX 页面转成……”、“控制台页面”、“管理后台”、“DeepBI 页面迁移”; - 提及位于 `apps/console/src/featur
立即学习“前端免费学习笔记(深入)”;
还有个问题就是,,截取字符串的长度。
我下面的这种方法,没有判断中文或者非中文,截取的长度总是有长有短。
不知道有没有好点的办法让截取的长度,一样长的,而不是str.Length的长度。
public static string formatString(string str, int size)
{
string temp = str;
Regex regex = new Regex("<.+?>");
temp = regex.Replace(str, "");
temp = temp.Replace("\r\n", "");
temp = temp.Replace(" ", "");
if (temp.Length >= size)
{
temp = temp.Substring(0, size - 3) + " ";
}
return temp;
}


















