看板 RegExp 關於我們 聯絡資訊
/* 聽說註明使用的語言、環境 * 問題有可能較容易被解決... */ 各位大大: 字串:ABC: asdas@sadasd(單獨一行) 請問,以上字串,想使用sed來取代成另一個字串, 正規表示式該如何表示? 謝謝大家 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 134.208.9.94
qwertmn:echo 'ABC: asdas@sadasd'|sed 's/\w*$/newstr/g' 10/17 16:20
qwertmn:s/目標字串(可用regexp表示)/取代後字串/g(旗標) 10/17 16:23