/^/m|/$/m|\b|\B|$&|$`|$'|变量捕获|()?|(?:pattern)|(?<LABEL>PATTERN)|$+{LABEL}|(|)|\g{LABEL}
#!/usr/bin/perl use strict;
use warnings; $_=' $$ oinn &&&
ninq kdownc
aninp
kkkk'; if (/(.*)k\Z/){print "$1\n";}else{print "no match\n";} # kkk if (/^n(.*)/m){print "$1\n";}else{print "no match\n";} #inq kdownc if (/(.*\bn.n\b.*)/){print "$1\n";}else{print "no match\n";} #no match if (/.*(\Bn.n\B).*/){print "$& and $1\n";}else{print "no match\n";} #aninp and nin if (/\w*(i)\w*/){print "$& and $1 and $` and $'\n";}else{print "no match\n";} #oinn and i and
#
# $$ and &&& my $new_words =
'sewfbiurev214`7i074o//m,m]\[g
sw d
trp'; if ($new_words =~ /(.*)g$/m){print "$1\n";}else{print "no match\n";} #sewfbiurev214`7i074o//m,m]\[ my $test = (<> =~ /^sd(.*)/m );if ($test){print "right!,it is $1\n";}else{print "no match\n";} #sdkkk
#right!,it is kkk my $what = shift @ARGV;if ($new_words =~ /(.*)($what$)/m){print "right!,it is $1 and $2\n";}else{print "no match\n";} # perl test.pl g
# right!,it is sewfbiurev214`7i074o//m,m]\[ and g $new_words =~ /(.*)g$/m;$new_words =~ /(.*)s$/m;print "$1\n"; #sewfbiurev214`7i074o//m,m]\[ $new_words =~ /(.*q)?(.*)g$/m;print "$2\n"; #sewfbiurev214`7i074o//m,m]\[ $new_words =~ /(?:.*q)?(.*)g$/m;print "$1\n"; #sewfbiurev214`7i074o//m,m]\[ $new_words =~ /(?:.*q)?(|s)(.*)g$/m;print "$1 and $2\n"; #s and ewfbiurev214`7i074o//m,m]\[ $new_words =~ /(?:.*q)?(?:|s)(?<label>.*)g$/m;print "$+{label}\n"; #ewfbiurev214`7i074o//m,m]\[ $new_words =~ /(?:.*q)?(?<label2>(|s))(?<label>.*)g$/m;print "$+{label} and $+{label2}\n"; #ewfbiurev214`7i074o//m,m]\[ and s my $test2 = 'aavvbbssd';
$test2 =~ /^(?<word1>.)\g{word1}(?<word2>.)\g{word2}/m;print "$+{word2} and $+{word1}\n"; #v and a print "|$`<$&>$'|\n"; #|<aavv>bbssd|
随机推荐
- HyperLedger Fabric 多机部署(二)
启动各个节点: ./orderer order节点启动方式 ./peer node start peer节点启动方式 Admin@org1.example.com 使用hyperledger fabr ...
- 前端js模糊搜索(模糊查询)
1.html结构: <label for="searchShop" class="clear pos-a" style="top:17px;&q ...
- 基础篇-密码文件.pgpass
密码文件包含字段 host:port:dbname:user:password port和dbname可以使用*号作通配符 在*nix系统中 ~/.pgpass 在windows系统中 %APPDAT ...
- npm ERR! missing script: build
webpack-bundle-analyzer webpack可视化插件,用来查看一共打了多少个包,每个包的体积和包里面的情况. 启动查看 npm run build --report 结果报错npm ...
- JMeter(2) 集成jmeter+ant+jenkins
一.ant安装 $su root $vi /etc/bashrc 插入两行(i+enter插入) export ANT_HOME=/usr/local/apache-ant-1.9.3 export ...
- 解决IE6 IE7绝对定位弹层被后面的元素遮住
解决IE6 IE7绝对定位弹层被后面的元素遮住? 弹层边框一直被后面的元素边框遮住,试了n种方法,只有这个比较好用. <div class="tuijian-table"&g ...
- Codeforces 183A(坐标系性质)
自从开始写上古场以后我就不断地写A.B题的题解了??? cf problem183A 无论每轮有哪几种选择,最后的可能结果放在一起一定是个钻石型,最后答案就是长方形长乘宽. 非常神奇的性质,如果走了e ...
- hdu5884
#include <cstdio> #include <queue> #include <algorithm> #include <string.h> ...
- SSIS父子维度
1.数据仓库结构: 2.区域的AttributeHierarchyVisible设置为False 3.Parent ID的Usage设置为Parent 4.级别命名: 5.结果:
- 开源分布式Job系统,调度与业务分离-HttpJob.Agent组件介绍以及如何使用
项目介绍: Hangfire:是一个开源的job调度系统,支持分布式JOB!! Hangfire.HttpJob 是我针对Hangfire开发的一个组件,该组件和Hangfire本身是独立的.可以独立 ...