文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Perl学习笔记(2)

Perl学习笔记(2)

时间:2005-12-09  来源:zhousqy

Three of predefined read-only variables:

很简单的E文,就不翻译了:-)

1: $&, which is the part of the string that matched the regular expression

2: $`, which is the part of the string before the part that matched

3: $', which is the part of the string after the part that matched

For example:

$_ = "this is a sample string";

/sa.*le/; # matches "sample" within the string

             # $` is now "this is a "

             # $& is now "sample"

             # $' is now " string"

相关阅读 更多 +
排行榜 更多 +
史诗竞速赛3D

史诗竞速赛3D

休闲益智 下载
加油站汽车修理工

加油站汽车修理工

休闲益智 下载
火柴人像素战斗

火柴人像素战斗

休闲益智 下载