[notepad++] 正則表達示and應該怎麼下呢?

看板Editor作者 (里歐)時間9年前 (2015/03/03 13:42), 編輯推噓4(402)
留言6則, 4人參與, 最新討論串1/1
我參考了stackoverflow上的方法 http://ppt.cc/8D3a 但都沒有成功... 請問如何在notepad++上使用and operator呢? 舉例我想搜尋一行裡有 peter, jane兩樣 ex: peter and jane 這行就會被我搜出來 p.s. 我有試過(?=.*word1)(?=.*word2)(?=.*word3),但同一行卻重複出現很多次,並 沒有達到我要的功能... -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.228.150.131 ※ 文章網址: https://www.ptt.cc/bbs/Editor/M.1425361357.A.580.html

03/03 15:26, , 1F
照理說 regular expression 應該沒有單純 and
03/03 15:26, 1F

03/05 00:15, , 2F
grep 兩次比較快?
03/05 00:15, 2F

03/05 00:16, , 3F
沒有notepad++,(peter.+jane|jane.+peter)自己排列
03/05 00:16, 3F

03/05 00:16, , 4F
組合一下
03/05 00:16, 4F

03/05 00:19, , 5F
如果我沒搞錯,regexp的AND其實就是自行concatenate
03/05 00:19, 5F

03/06 11:53, , 6F
感謝Y大,用你的方法成功了!
03/06 11:53, 6F
文章代碼(AID): #1KzKdDM0 (Editor)