/^/m|/$/m|\b|\B|$&|$`|$'|变量捕获|()?|(?:pattern)|(?<LABEL>PATTERN)|$+{LABEL}|(|)|\g{LABEL}
2024-09-04 05:21:24
#!/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|
最新文章
- Good Bye 2016
- 【python】global
- C++基础知识易错点总结(1)
- C# 中DataTable转成模型List
- (转)Android: NDK编程入门笔记
- GET和POST的区别,就是明信片和信封的区别
- 随机森林——Random Forests
- Metadata Lock原理7
- Linux概念架构的理解
- RabbitMQ-死信(Dead Letter)
- jsp页面onsubmit=&;quot;return checklogin();&;quot;该解决方案给
- 【Azure】Azure学习方法和学习资料
- Java-认识变量、注释并能及时发现错误
- .Net Core下使用WCF
- python中filter,reduce,map的用法
- 团队作业——Alpha冲刺
- Linux记录-进程数和句柄数调整
- 三种简单排序算法(java实现)
- [Jmeter] Concurrency Thread Group
- Linux+mysql+apache+php
热门文章
- [UE4]C++实现动态加载的问题:LoadClass()和LoadObject()
- 渲染路径-Unity5 的新旧推迟渲染Deferred Lighting Rendering Path
- 【转】oracle的分析函数over
- 洛谷P3405 [USACO16DEC]Cities and States省市
- 洛谷P2759 奇怪的函数
- left join on 和where条件的放置(转)
- 利用sizeof,得到二维数组的维度
- SPI接口的ETH芯片(ENC28J60/W5500)
- spring boot Filter过滤器的简单使用
- 如何检查linux 下是否安装java(jdk)环境