开发者

replace string within file and the filename

开发者 https://www.devze.com 2023-03-16 12:55 出处:网络
I have a string test.cgi@action=<action-name> <action-name> can be any string I would like to replace the above string with <action-name>.html

I have a string test.cgi@action=<action-name>

<action-name> can be any string

I would like to replace the above string with <action-name>.html

Can any one please let me know how I can proceed with t开发者_开发知识库his using a Perl script?


$string =~ s/test\.cgi@action=(.*?)/$1.html/g;
0

精彩评论

暂无评论...
验证码 换一张
取 消