我爱Aspx >> Asp.Net >> 解读C#中的规则表达式(正则表达式)MatchCollection mc14 = Regex.Matches(t14, p14);
找出所有的大写字母
string t15 = "This IS a Test OF ALL Caps";
string p15 = @"(\b[^\Wa-z0-9_]+\b)";
MatchCollection mc15 = Regex.Matches(t15, p15);
找出小写的单词
string t16 = "This is A Test of lowercase";
string p16 = @"(\b[^\WA-Z0-9_]+\b)";
MatchCollection mc16 = Regex.Matches(t16, p16);
找出第一个字母为大写的单词
string t17 = "This is A Test of Initial Caps";
string p17 = @"(\b[^\Wa-z0-9_][^\WA-Z0-9_]*\b)";
MatchCollection mc17 = Regex.Matches(t17, p17);
找出简单的HTML语言中的链接
string t18 = @"
<html>
<a href="http://www.5iaspx.com/first.htm>first" tag text</a>
<a href="http://www.5iaspx.com/next.htm>next" tag text</a>
</html>
";
string p18 = @"<A[^>]*?HREF\s*=\s*[""']?" + @"([^'"" >]+?)[ '""]?>";
MatchCollection mc18 = Regex.Matches(t18, p18, "si");
Ҷƪл˵?
C#中的特性(Attributes)[04-21]
几个C#写的网络相关开源组件[04-21]
多个页面向同一目标页面PostBack..[04-21]
常用SQL书写技巧[04-21]
常用CHM帮助文档集锦下载[04-21]
数据分页显示方案[04-21]
ASP.NET 2.0 正式版中无刷新页面..[04-21]
c#学习体会:使用 ref 和 out 传递..[04-21]
c#中使用ref和out一点认识[04-21]
Ajax在.NET中与Server控件的交互[04-21]