本帖最后由 yshihyu 于 2014-10-06 19:37 编辑 [code]+12 -23 +23.456 -236.23 123.0 123 234352345[/code][0-9]+\.[0-9]+|\+\d+|\-\d+|\+[0-9]+\.[0-9]+|\d+ 我这样写好像也是有问题~ , 请问上面数据要怎么写出简洁的正则表达式 thanks
[root@linjianying ~]# cat shell welcome to iphonebar.net iphone belongs me [root@linjianying ~]# grep -E '+me' shell --color welcome to iphonebar.net me 疑问:+表示它前面的字符至少出现1次,为什么me还会被过滤出来呢?me前面没有字符的啊。
本帖最后由 chenzhanyiczy 于 2013-10-31 15:59 编辑 man regex Within a bracket expression, a collating element (a character, a multi-character sequence that collates as if it were a single character, or a collating-sequence name for either) enclosed in "[." and ".]" stands for the sequence of characters of that collating element. The sequence is a single element of the brac...
man regex Within a bracket expression, a collating element (a character, a multi-character sequence that collates as if it were a single character, or a collating-sequence name for either) enclosed in "[." and ".]" stands for the sequence of characters of that collating element. The sequence is a single element of the bracket expression’s list. A bracket expressio...
工作中一直用不到,最近想学习下,发现这个东西真是好。从网上找了个语法,试着些一个:找C语言函数名的正则表达式,调好之后,发现是.net下的语法,各个语言中的正则表达式竟然语法还不同。linux下shell里面弄了一下午没搞定。 1、求linuxshell下的找C语言函数名的正则表达式 2、求正则表达式的电子书 3、问:哪个语言下的正则表达式使用广泛 白天无法上网,只能晚上发帖,helpme,3ks
正则表达式 想必很多人都对正则表达式都头疼.今天,我以我的认识,加上网上一些文章,希望用常人都可以理解的表达方式.来和大家分享学习经验. 开篇,还是得说说 ^ 和 $ 他们是分别用来匹配字符串的开始和结束,以下分别举例说明 "^The": 开头一定要有"The"字符串; "of despair$": 结尾一定要有"of despair" 的字符串; 那么, "^abc$": 就是要求以abc开头和以abc结尾的字符串,实际上是只有abc匹配 "notice": 匹配包含...