Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex Perl正则表达式问题_Regex_Perl - Fatal编程技术网

Regex Perl正则表达式问题

Regex Perl正则表达式问题,regex,perl,Regex,Perl,如何在regex replace中执行一些代码,例如,用一个新的随机数多次替换某物?例如,s/foo/rand()/e例如,s/foo/rand()/e当你说“regex”时,你指的是“替换运算符”(或简称为“s//)。当你说“regex”时,你指的是“替换运算符”(或简称为“s//)。

如何在regex replace中执行一些代码,例如,用一个新的随机数多次替换某物?

例如,
s/foo/rand()/e
例如,
s/foo/rand()/e

当你说“regex”时,你指的是“替换运算符”(或简称为“
s//
)。当你说“regex”时,你指的是“替换运算符”(或简称为“
s//
)。