Suppose I search on VS Code the terms 'word1 word2'. Then it finds all the occurrences where 'word1' is followed by 'word2'. In reality I want to find all the files where word1 and word2 occur, but they don't have to be consecutive. How can I do it?
Use regex flag and search for (word1[sS ]*word2)|(word2[sS ]*word1)
(word1[sS ]*word2)|(word2[sS ]*word1)
Made a small extension based on @tonix regex:
https://marketplace.visualstudio.com/items?itemName=usernamehw.search
2.1m questions
2.1m answers
60 comments
57.0k users