If you want to find string1 or string2 , use /string1|string2 . You said you want lines where you find both:
/string1.*string2
If you do not know the order in the line and want to see the full line, you will need
/.*string1.*string2.*|.*string2.*string1.*
Or shorter
/.*(string1.*string2|string2.*string1).*
Combining more words without a fixed order will become a mess, and filtering with awk will be enjoyable.
source share