2021年1月7日星期四

How to match multiple words in multiple lines

I have a multiline text, e.g.

word1 in line1       word2 in line2    word3 in line 3  

I need to see if two words present in whole text (AND operator). I tried something like:

/^.*(?=.*word1)(?=.*word3).*$/gm  
https://stackoverflow.com/questions/65622884/how-to-match-multiple-words-in-multiple-lines January 08, 2021 at 11:03AM

没有评论:

发表评论