免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1562 | 回复: 4
打印 上一主题 下一主题

!~操作符是什么意思啊 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-03-20 22:13 |只看该作者 |倒序浏览
手册上面好像找不到有这个符号介绍, 麻烦大家指教一下。

论坛徽章:
0
2 [报告]
发表于 2012-03-20 23:05 |只看该作者
not match

论坛徽章:
13
双鱼座
日期:2013-10-23 09:30:05数据库技术版块每日发帖之星
日期:2016-04-20 06:20:00程序设计版块每日发帖之星
日期:2016-03-09 06:20:002015亚冠之塔什干火车头
日期:2015-11-02 10:07:452015亚冠之德黑兰石油
日期:2015-08-30 10:07:07数据库技术版块每日发帖之星
日期:2015-08-28 06:20:00数据库技术版块每日发帖之星
日期:2015-08-05 06:20:002015年迎新春徽章
日期:2015-03-04 09:57:09辰龙
日期:2014-12-03 14:45:52酉鸡
日期:2014-07-23 09:46:23亥猪
日期:2014-03-13 08:46:22金牛座
日期:2014-02-11 09:36:21
3 [报告]
发表于 2012-03-21 08:44 |只看该作者
不匹配

论坛徽章:
145
技术图书徽章
日期:2013-10-01 15:32:13戌狗
日期:2013-10-25 13:31:35金牛座
日期:2013-11-04 16:22:07子鼠
日期:2013-11-18 18:48:57白羊座
日期:2013-11-29 10:09:11狮子座
日期:2013-12-12 09:57:42白羊座
日期:2013-12-24 16:24:46辰龙
日期:2014-01-08 15:26:12技术图书徽章
日期:2014-01-17 13:24:40巳蛇
日期:2014-02-18 14:32:59未羊
日期:2014-02-20 14:12:13白羊座
日期:2014-02-26 12:06:59
4 [报告]
发表于 2012-03-21 09:34 |只看该作者
回复 1# congkk

equal and not equal ( == and !=)
match and not match ( =~ and !~)


$ perldoc perlretut

NAME
       perlretut - Perl regular expressions tutorial

DESCRIPTION
       This page provides a basic tutorial on understanding, creating and
       using regular expressions in Perl.  It serves as a complement to the
       reference page on regular expressions perlre.  Regular expressions are
       an integral part of the "m//", "s///", "qr//" and "split" operators and
       so this tutorial also overlaps with "Regexp Quote-Like Operators" in
       perlop and "split" in perlfunc.
   
       ...
       ...
           if ("Hello World" =~ /World/) {
               print "It matches\n";
           }
           else {
               print "It doesn't match\n";
           }

       There are useful variations on this theme. The sense of the match can
       be reversed by using the "!~" operator:


           if ("Hello World" !~ /World/) {
               print "It doesn't match\n";
           }
           else {
               print "It matches\n";
           }

论坛徽章:
0
5 [报告]
发表于 2012-03-22 16:02 |只看该作者
不匹配,
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP