正则表达式验证正确性测试程序

#perl语言

#!/usr/bin/perl

        use 5.14.2;
        use strict;
        use warnings;
        while(<>){
                chomp;
                if(/abc/){
                        print "matched :|$`<$&>$'|\n";
                }
                else{
                        print "no match: |$_|\n";
                }
        }

你可能感兴趣的:(正则表达式验证正确性测试程序)