码迷,mamicode.com
首页 >  
搜索关键字:regex    ( 2502个结果
C# 使用正则表达式去掉字符串中的数字,或者去掉字符串中的非数字
/// 去掉字符串中的数字 public static string RemoveNumber(string key) { return Regex.Replace(key, @"\d", ""); } //去掉字符串中的非数字public static string RemoveNotNumber ...
分类:Windows程序   时间:2016-04-08 00:45:44    阅读次数:224
c# HTML中提取图片地址
public class HtmlHelper{/// /// HTML中提取图片地址/// public static List PickupImgUrl(string html){Regex regImg = new Regex(@"]*?\bsrc[\s\t\r\n]*=[\s\t... ...
分类:Windows程序   时间:2016-04-07 09:31:54    阅读次数:242
【转载】递归正则表达式的一般构造方法
标题:递归正则表达式的一般构造方法 作者:xhd2015 原帖:http://tieba.baidu.com/p/4117059926 先说说问题吧,很老套,如何匹配嵌套的<>如果你能匹配class regex< >恭喜你,最初级的会了,往下看当然,如果class regex<class<> ←如果 ...
分类:其他好文   时间:2016-04-06 15:07:26    阅读次数:184
c# 正则表达式笔记
c# 正则表达式笔记 估计要写几天 看得一个不错的正则教程包括字符串教程 C#字符串和正则表达式参考手册.pdf 正则所需要的命名空间是 using System.Text.RegularExpressions 它包含了8个类,用得最多是的Regex; Regex不仅可以用来创建正则表达式,而且提供 ...
分类:Windows程序   时间:2016-04-06 08:14:54    阅读次数:256
C#中正则表达式的使用
目前为止,许多编程语言和工具都包含对正则表达式的支持,C#也不例外,C#基础类库中包含有一个命名空间(System.Text.RegularExpressions)和一系列可以充分发挥规则表达式威力的类(Regex、Match、Group等)。那么,什么是正则表达式,怎么定义正则表达式呢? 一、正则 ...
分类:Windows程序   时间:2016-04-05 19:44:58    阅读次数:217
C# Regex ignoring non-capturing group
E.g I want match the keword "3398" after "red" from the string "This is red with number 3398". Using non-capturing group regex will help me sovle this ...
分类:Windows程序   时间:2016-04-05 10:49:47    阅读次数:304
Unicode 编码解码
1. Regex.Unescape(str);返回Unicode解码,非Unicode直接返回 /// <summary> /// 2.转为Unicode编码 /// </summary> /// <param name="str"></param> /// <returns></returns> ...
分类:其他好文   时间:2016-04-04 01:19:27    阅读次数:160
安装pcre(为了支持rewrite功能,我们需要安装pcre)
root@hkg ~# apt-get install pcre* Reading package lists... DoneBuilding dependency treeReading state information... DoneNote, selecting 'libghc-regex- ...
分类:其他好文   时间:2016-04-03 20:05:57    阅读次数:189
正则表达式之Regex.Match()用法
...
分类:其他好文   时间:2016-04-01 10:18:06    阅读次数:332
正则表达式在线教程
教程:http://deerchao.net/tutorials/regex/regex-1.htm 在线调试:http://regexr.com/ ...
分类:其他好文   时间:2016-03-31 23:24:51    阅读次数:207
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!