skip to main
|
skip to sidebar
Shawn's Blog
显示标签为“
perl inline regular expression replace
”的博文。
显示所有博文
显示标签为“
perl inline regular expression replace
”的博文。
显示所有博文
2007年12月29日星期六
perl正则表达式里的变量替换
perl正则表达式里的变量替换
perl正则表达式里的变量替换
语法比较特别,难记
帖之,备忘:
perl code:
my $str1 = '123abc123';
my $str2 = 'str2';
print "\n\n$str1";
$str1 =~ s/abc/${str2}/gsi;
print "\n\n$str1";
output:
123str2123
应该能看懂吧.
回头多看,多记,少忘
较旧的博文
主页
订阅:
博文 (Atom)
博客归档
▼
2013
(1)
▼
十二月
(1)
Short key for Mplayer to download subtitles
►
2009
(3)
►
三月
(1)
►
二月
(2)
►
2008
(23)
►
十二月
(6)
►
十月
(8)
►
九月
(5)
►
八月
(4)
►
2007
(16)
►
十二月
(16)
我的简介
Shawn Yan
查看我的完整个人资料