10 lines
227 B
Perl
10 lines
227 B
Perl
#!/usr/bin/perl
|
|
|
|
$txt="ab\ncd";
|
|
$txt =~ /a.*c/m; # 匹配失败
|
|
print "===match start===\n$&\n===match end===\n";
|
|
|
|
$txt="ab\ncd";
|
|
$txt =~ /a.*c/ms; # 匹配成功
|
|
print "===match start===\n$&\n===match end===\n";
|