正则表达式(regular expression)描述了一种字符串匹配的模式,可以用来检查一个串是否含有某种子串、将匹配的子串做替换或者从某个串中取出符合某个条件的子串等。列目录时, dir *.txt或ls *.txt中的*.txt就不是一个正则表达式,因为这里*与正则式的*的含义是不同的。正则表...
分类:
其他好文 时间:
2015-12-26 13:18:19
阅读次数:
209
简介grep (global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。Unix的grep家族包括grep、egrep和fgr...
分类:
其他好文 时间:
2015-12-18 14:31:50
阅读次数:
224
PCRE(Perl Compatible Regular Expressions)是一个轻量级的Perl函数库,包括 perl 兼容的正则表达式库。它比Boost之类的正则表达式库小得多。PCRE十分易用,同时功能也很强大,性能超过了POSIX正则表达式库和一些经典的正则表达式库。下载wget ft...
分类:
其他好文 时间:
2015-12-16 21:11:01
阅读次数:
175
http://poj.org/problem?id=2955DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular b...
分类:
其他好文 时间:
2015-12-16 18:59:57
阅读次数:
128
题目:Regular Expression MatchingImplement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or ...
分类:
其他好文 时间:
2015-12-14 18:50:24
阅读次数:
115
从服务器上下载文件,报错如下:notaregularfile原因:因为下载的是文件夹,并非文件所以应加上–r参数Scp命令用于两台linux主机间的文件复制本地上传文件夹到服务器Scp–r/usr/local/share用户名@ip:/usr/local本地上传文件到服务器Scp/usr/local/share用户名@ip:/usr/local从..
分类:
其他好文 时间:
2015-12-11 07:15:28
阅读次数:
125
Bootstrap3 为何无法显示Glyphicons 图标在CSS引入字体即可解决@font-face { font-family: 'Glyphicons Halflings'; src: url('/fonts/glyphicons-halflings-regular.eot'); sr...
分类:
其他好文 时间:
2015-12-10 23:25:40
阅读次数:
748
XAlignAn amazing Xcode plugin to align regular code. It can align anything by using custom alignment patterns.What's XAlignHere are some example align...
分类:
其他好文 时间:
2015-12-07 18:35:15
阅读次数:
134
1. 基本概念 正则表达式(Regular Expression)就是用事先定义好的一些特定字符(元字符)或普通字符、及这些字符的组合,组成一个“规则字符串”,这个“规则字符串”用来判断我们给定的字符串是否匹配它的过滤逻辑。通过正则表达式,也可以从字符串中获取我们想要的特定部分。 正则表达式的...
分类:
其他好文 时间:
2015-12-06 20:46:56
阅读次数:
251
Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The...
分类:
其他好文 时间:
2015-12-06 17:31:24
阅读次数:
125