文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>perl正则表达式元字符常量化

perl正则表达式元字符常量化

时间:2009-05-30  来源:aqcjsy1

perl正则表达式中,\Q用于是元字符常量化,例如 C:\Perl\bin>perl
$what = "[box]";
foreach (qw(in[box] out[box] white[sox])) {
if (/\Q$what\E/) {
print "$_ matched!\n";
}
}
^D
in[box] matched!
out[box] matched!
C:\Perl\bin>perl
$what = "[box]";
foreach (qw(in[box] out[box] white[sox])) {
if (/$what\E/) {
print "$_ matched!\n";
}
}
^D
in[box] matched!
out[box] matched!
white[sox] matched!
相关阅读 更多 +
排行榜 更多 +
宝宝情商养成宝宝巴士

宝宝情商养成宝宝巴士

休闲益智 下载
燥热手机版

燥热手机版

飞行射击 下载
巨人狙击手安卓版

巨人狙击手安卓版

飞行射击 下载