diff --git a/src/EasyFrameWork/EasyFrameWork.csproj b/src/EasyFrameWork/EasyFrameWork.csproj index 791d739be..81f3fbdab 100644 --- a/src/EasyFrameWork/EasyFrameWork.csproj +++ b/src/EasyFrameWork/EasyFrameWork.csproj @@ -20,13 +20,13 @@ - - - + + + - + diff --git a/src/EasyFrameWork/Extend/ExtString.cs b/src/EasyFrameWork/Extend/ExtString.cs index e633a8c6d..f8e26e984 100644 --- a/src/EasyFrameWork/Extend/ExtString.cs +++ b/src/EasyFrameWork/Extend/ExtString.cs @@ -9,35 +9,78 @@ namespace Easy.Extend { - public static class ExtString + public static partial class ExtString { - public static string NoHTML(this string Htmlstring) - { - Htmlstring = Regex.Replace(Htmlstring, @"", "", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"", "", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"", "", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"<.*?>", "", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"<(.[^>]*)>", " ", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"([\r\n])[\s]+", " ", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"-->", " ", RegexOptions.IgnoreCase); - Htmlstring = Regex.Replace(Htmlstring, @"", RegexOptions.IgnoreCase)] + private static partial Regex RegexCommentEnd(); + [GeneratedRegex("