首页 > 其他 > 详细

正则表达式(1)

时间:2014-04-21 00:23:55      阅读:504      评论:0      收藏:0      [点我收藏+]

很早就看了正则表达式,python啊,c++什么的都有,从来没细致学过,最近突然看到C#更强大,而且居然找到了一个《C#字符串和正则表达式参考手册.pdf》,就随便记些什么吧。程序员的老规矩,上代码,跑一遍比什么理论都强。

最简单的一个匹配程序:

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Text.RegularExpressions;
 
namespace regex1 
{ 
    class Program 
    { 
        static void Main(string[] args) 
        { 
            Regex myRegEx = new Regex("ABC", RegexOptions.IgnoreCase); 
            Console.WriteLine(myRegEx.IsMatch("The first three letters of" + "the alphabet ar ABC")); 
        } 
    } 
} 
 

正则表达式(1),布布扣,bubuko.com

正则表达式(1)

原文:http://www.cnblogs.com/luhouxiang/p/3675954.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!