#!/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|

随机推荐

  1. 移动端tab目录(有待完善)

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...

  2. git配置命令

    一.Git安装及密钥的生成 1.下载Git软件:http://msysgit.github.io/ 2.桌面右键 Git Bash Here 打开git命令行: 3.ssh-keygen -t rsa ...

  3. oracle 查看 job 日志

    select * from user_scheduler_job_log select * from user_scheduler_job_run_details select *  from use ...

  4. thinkphp5.1静态文件存放问题

    5.1的版本不能将静态文件放在application目录下,只能放在public目录下,否则会拒绝访问

  5. $("body").animate({"scrollTop":top})无效的问题

    问题 我在个人站点的左下角和右下角各自使用了如下代码来将页面滚动到顶部和底部: $("body").animate({scrollTop:0},800); $("body ...

  6. 使用echo命令向文件写入内容

    0.前言     本文总结如何使用echo命令向文件中写入内容,例如使用echo指令覆盖文件内容,使用echo指令向文件追加内容,使用echo指令往文件中追加制表符.     echo向文件中输出内容 ...

  7. Mac用brew安装MySQL

    1.先安装brew 网址:https://brew.sh/ 复制命令:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent ...

  8. Codeforces Round #566 (Div. 2) B. Plus from Picture

    链接: https://codeforces.com/contest/1182/problem/B 题意: You have a given picture with size w×h. Determ ...

  9. POJ1741(点分治)

    分治的时候SZ感觉是错的--但是貌似第一次找好重心就够了,之后SZ别太离谱就不会T,重心随一随缘就好-- #include <cstdio> #include <cstring> ...

  10. svn属性忽略

    svn属性 svn:ignore logslibs .settings.settings/*targettarget/*.classpath.project