[問題] 代換字串

看板Perl作者 (KCda260)時間17年前 (2007/12/09 18:58), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
請問 若有一個test.txt檔 它的內容是這樣的 the keyword is *frequency* and the XXxXX... perl可以將frequency replace成time這個字嗎 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.121.67.223

12/09 19:04, , 1F
我是要replace兩個**之間的東西 wordpad ctrl+h應該不行
12/09 19:04, 1F

12/09 19:07, , 2F
$str =~ s/\*\w+\*/*time*/;
12/09 19:07, 2F
文章代碼(AID): #17Myf6-V (Perl)
文章代碼(AID): #17Myf6-V (Perl)