regex - Regular expression to match a line containing only the list of words -


looking regular expression match given list of words in strings

the regular expression pattern match strings containing boy or apple in below list of strings

[apple, boy, apple, boy]  [boy, boy, boy, boy]  [apple, boy, boy, boy]  

to match

[apple, boy, apple, boy] [apple, boy, boy, boy]  

try if works:

(?=.*apple)(?=.*boy).* 

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -