use strict; use warnings; use re 'debug'; sub test { my $str = "123456789"; print join(":", split /(?<=...)/, $str); } test();
use re 'debug' 可以查看正则表达式的匹配过程。
最新推荐文章于 2024-09-15 15:27:19 发布

use strict; use warnings; use re 'debug'; sub test { my $str = "123456789"; print join(":", split /(?<=...)/, $str); } test();