perl /g
来源:互联网 发布:柴可夫斯基妻子知乎 编辑:程序博客网 时间:2024/05/16 08:16
[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 `tb2` . `id2` = 2 or `id3` > 3 and `id4` >22"; print "\$sql is $sql\n"; foreach ($sql =~ /(`\w+`\s*\.?\s*)/g){ print "\$_ is $_\n"; push (@str,$_); }; $sql=""; foreach (@str){ $sql=$sql.$_; }; $sql =~ s/\s+\.\s+/\./g; my @arr=split (/\s+/,$sql); foreach (@arr){ print "\$_ is $_\n"; };[oracle@oadb test]$ perl t1.pl $sql is where `lc`.`tb`.`xx` = 1 and `tb2` . `id2` = 2 or `id3` > 3 and `id4` >22$_ is `lc`.$_ is `tb`.$_ is `xx` $_ is `tb2` . $_ is `id2` $_ is `id3` $_ is `id4` $_ is `lc`.`tb`.`xx`$_ is `tb2`.`id2`$_ is `id3`$_ is `id4/g模式匹配修饰符查找所有可能的匹配
0 0
- perl /g
- [PERL]G-Injector Perl Script
- [Perl]关于m//g的问题
- [Perl]关于m//g的问题
- Perl——正则表达式(三) 更多匹配 //g
- Perl篇:Oracle 10g与安装Perl环境时的冲突以及解决方法
- Perl篇:Oracle 10g与安装Perl环境时的冲突以及解决方法
- perl
- Perl
- perl
- perl
- Perl
- perl
- perl
- perl
- Perl
- perl
- perl
- angularJS1 url中携带参数的获取
- Nginx重新编译添加模块
- rep stos dword ptr es:[edi]
- 常用的Mysql数据库操作语句大全
- mysql存储过程语法及实例
- perl /g
- Spring容器中Bean的作用域
- qt车牌查询
- 主键索引和唯一索引的区别
- Hibernate中的ID生成策略(XML和Annotation)
- HDU 2089 不要62
- Kafka和Spring集成实践
- MySQL存储过程详解
- bootstrap validator 使用笔记