avatar
F*e
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.
avatar
w*g
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.

avatar
o*z
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.

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

【在 o***z 的大作中提到】
: 把match "containing colon"的结果反一下成不?
avatar
p*f
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.

avatar
o*z
6
change 'if' to 'unless'?

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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。