Perl Regex: usage of non capturing, (more powerful split)

    技术2022-05-11  101

    #! perl -w $/ = "/n"; use Data::Dumper; #usage of non capturing, (more powerful split) ___FCKpd___0 = '12a34b5'; print "string = ".___FCKpd___0 ."/n"; @num = split /(a|b)/; print "capturing/n"; print Dumper(/@num); print "/n"; @num = split /(?:a|b)/; print "non capturing/n"; print Dumper(/@num);

    最新回复(0)