假設文字檔如下as23 43df 231, er56 tt676 2w34 dddww45, dfe4 678, ......當字串="tt676"時就把"er56 tt676 2w34 dddww45"取出來也就是字串符合文字檔中的資料就把兩個逗號之間的字串取出麻煩了,謝謝
pinget9 wrote:感謝你的說明不過還是...(恕刪) 千言萬語不如程式源碼aSTR=split("as23 43df 231, er56 tt676 2w34 dddww45, dfe4 678",",")for i = 0 to ubound(aSTR)if instr(aSTR(i)," tt676 ") then' 抓到了debug.print aSTR(i)end ifnext