不好意思
這問題 我找很久了 還是找不到
問題是這樣
假如我有一個文字檔
例如:
I wanna leave my footprints on the sands of time Know
there was something that, and something that I left behind
When I leave this world, I'll leave no regrets Leave something to remember,
我想找這行出來
there was something that, and something that I left behind
我下的方式是
cat txt | grep -o "there * that"
這邊* 我想要說可以是任意字串
但grep 任意字元 似乎不是用*
我google很久 有找到一個 \w*
可以表示任意一個字元
但這不符合我的需求
因為我不知道中間的任意字元會有幾個
請問有人有好方法嗎??
謝謝