由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - regexp help
相关主题
ASK AGAIN!!!Re: How to open/edit a huge text file借人气,请大家帮忙
a question about regular expression为什么中国女人在外国男人面前“作”不起来?
XEmacs C++-font-lock custumizing question一道Google面试题,怎么做?(题目描述有误,已修改)
regex: what does [^ ] mean?胃痛
help on emacs / replace问一下dividend在什么情况下会影响option strike
how to count string times using perl这个女的我可以追得到吗?
来,做题吧。[合集] How to use SAS for complete permutation
being with a white dude总有不少老夫喜欢瞎喷六四
相关话题的讨论汇总
话题: regexp话题: following话题: colon话题: return话题: contaning
进入Unix版参与讨论
1 (共1页)
F**e
发帖数: 593
1
what's the regular expression for "not contaning colon", for which
the following will return 1:
aabbcc
and the following will return 0:
aabb:cc
Thanks.
w*******g
发帖数: 51
2
/[^:]/g, well, following perl convention.

【在 F**e 的大作中提到】
: what's the regular expression for "not contaning colon", for which
: the following will return 1:
: aabbcc
: and the following will return 0:
: aabb:cc
: Thanks.

o***z
发帖数: 133
3
把match "containing colon"的结果反一下成不?

【在 F**e 的大作中提到】
: what's the regular expression for "not contaning colon", for which
: the following will return 1:
: aabbcc
: and the following will return 0:
: aabb:cc
: Thanks.

F**e
发帖数: 593
4
How to invert?
"match colon" would be "[:]", but "[^:]" returns 1 in both cases.

【在 o***z 的大作中提到】
: 把match "containing colon"的结果反一下成不?
p******f
发帖数: 162
5

if perl, you can say,
$_ !~ /:/;
or
$_ =~ /^[^:]*$/;

【在 F**e 的大作中提到】
: what's the regular expression for "not contaning colon", for which
: the following will return 1:
: aabbcc
: and the following will return 0:
: aabb:cc
: Thanks.

o***z
发帖数: 133
6
change 'if' to 'unless'?

【在 F**e 的大作中提到】
: How to invert?
: "match colon" would be "[:]", but "[^:]" returns 1 in both cases.

1 (共1页)
进入Unix版参与讨论
相关主题
总有不少老夫喜欢瞎喷六四help on emacs / replace
baidu alibaba宣布暂时停止招人how to count string times using perl
问一个Java regexp的题来,做题吧。
grep + perl regular expr (转载)being with a white dude
ASK AGAIN!!!Re: How to open/edit a huge text file借人气,请大家帮忙
a question about regular expression为什么中国女人在外国男人面前“作”不起来?
XEmacs C++-font-lock custumizing question一道Google面试题,怎么做?(题目描述有误,已修改)
regex: what does [^ ] mean?胃痛
相关话题的讨论汇总
话题: regexp话题: following话题: colon话题: return话题: contaning