App_Code/Common/Regular.cs
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;
using System.Collections;
/// <summary>
/// Regular 正则表达式
/// </summary>
///
namespace SystemRegular
{
public class Regular
{
public Regular()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public static bool IsMatch(string 正则表达式, string 字符串, RegexOptions 正规选项)
{
try
{
Regex testRegex = new Regex(正则表达式, 正规选项);
if (testRegex.IsMatch(字符串))
return true;
else
return false;
}
catch (ArgumentException ex)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.Write("\nThere was an error in your regular expression:\r\n" + ex.Message);
Console.ResetColor();
return false;
}
}
//using System.Text.RegularExpressions;
//using System.Collections;
public static ArrayList RegexMatches(string 正则表达式, string 字符串, RegexOptions 正则选项)
{
try
{
Regex matchesRegex = new Regex(正则表达式, 正则选项);
MatchCollection matchesFound;
matchesFound = matchesRegex.Matches(字符串);
ArrayList rAL = new ArrayList();
foreach (Match matchMade in matchesFound)
rAL.Add(matchMade.Value);
后面还有 205 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。