mirror of
https://github.com/nsnail/ns-ext.git
synced 2025-06-20 07:18:15 +08:00
refactor: ♻️ 2.0 (#3)
This commit is contained in:
21
src/backend/NSExt/Constant/Regexes.cs
Normal file
21
src/backend/NSExt/Constant/Regexes.cs
Normal file
@ -0,0 +1,21 @@
|
||||
namespace NSExt.Constant;
|
||||
#pragma warning disable SYSLIB1045
|
||||
|
||||
/// <summary>
|
||||
/// 使用 RegexGenerator 新特性会生成重复key值的xmlComment导致出错
|
||||
/// </summary>
|
||||
internal static class Regexes
|
||||
{
|
||||
public static readonly Regex RegexBacksLantUnicode
|
||||
= new(@"\\u([a-fA-F0-9]{4})", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
public static readonly Regex RegexHtmlTag = new("<[^>]*>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
public static readonly Regex RegexMobile
|
||||
= new(@"^(\d{3})\d{4}(\d{4})$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
public static readonly Regex RegexPercentUnicode
|
||||
= new(@"\\u([a-fA-F0-9]{4})", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
public static readonly Regex RegexUpLetter = new("([A-Z])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
}
|
Reference in New Issue
Block a user