[oracle@oadb test]$ cat t2.pl
my $str='1a2';
if ($str =~ /[b]*/){print "1111111111\n"};
[oracle@oadb test]$ cat t2.pl
my $str='1a2';
if ($str =~ /[b]*/){print "1111111111\n"};
[oracle@oadb test]$ perl t2.pl
1111111111
匹配 0 次或多次b
[oracle@oadb test]$ cat t2.pl
my $str='1a2';
if ($str =~ /[b]?/){print "1111111111\n"};
[oracle@oadb test]$ perl t2.pl
1111111111
匹配 0 次或一次 b字符串
[oracle@oadb test]$ cat t2.pl
my $str='1a';
if ($str =~ /[b]+/){print "1111111111\n"};
[oracle@oadb test]$ perl t2.pl
[oracle@oadb test]$
+ 匹配 1 次或多次b
[oracle@oadb test]$ cat t2.pl
my $str='b1a';
if ($str =~ /[b]+/){print "1111111111\n"};
[oracle@oadb test]$ perl t2.pl
1111111111
[oracle@oadb test]$ cat t1.pl
my $sql="where `lc`.`tb`.`xx` = 1 and `tb
perl /g
最新推荐文章于 2019-09-18 11:48:39 发布