问候。
我的任务是调试涉及正则表达式的应用程序的一部分——但是,我以前从未处理过正则表达式。两个问题:
1)我知道正则表达式应该测试两个字符串是否等价,但是下面的两个正则表达式语句具体是什么意思?
2) 有没有人推荐我可以了解更多关于正则表达式的网站/资源?(最好在 C# 中)
if (Regex.IsMatch(testString, @"^(\s*?)(" + tag + @")(\s*?),", RegexOptions.IgnoreCase))
{
result = true;
}
else if (Regex.IsMatch(testString, @",(\s*?)(" + tag + @")(\s*?),", RegexOptions.IgnoreCase))
{
result = true;
}