Jos*_*eph 8 php regex perl
我们在Perl中有一个preg_callback等价物吗?
让我们说我想匹配一些东西,并用匹配的东西调用的函数的返回值替换它.
YOU*_*YOU 17
使用s///e- 评估修饰符,你可以在第二部分放置任意perl代码.
s///e
$x = "this is a test"; $x =~ s/(test)/reverse($1)/eg; print $x; //this is a tset
参考:http://perldoc.perl.org/perlretut.html#Search-and-replace
归档时间:
15 年,4 月 前
查看次数:
996 次
最近记录: