组件日志类优化,不再使用'['来标记分隔,使用了一个不可见字符\u0002分隔,提高筛选准确性。

This commit is contained in:
dathlin
2017-06-17 17:32:55 +08:00
parent a8aad0b3dc
commit e500d9797c
3 changed files with 2 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ namespace 软件系统客户端模版
private string FilterString(string filter)
{
StringBuilder sb = new StringBuilder();
MatchCollection mc = Regex.Matches(LogTemp, @"\[" + filter + @"[^\[]+");
MatchCollection mc = Regex.Matches(LogTemp, @"\u0002\[" + filter + @"[^\u0002]+");
foreach (Match m in mc)
{
sb.Append(m.Value);