G
G
Greg Plitt2021-06-13 19:15:27
Notepad++
Greg Plitt, 2021-06-13 19:15:27

How to find word order using regular expressions?

Forgive me for the probably obvious question, but how can I use regular expressions to search through thousands of documents and find only those that contain "callback" and "" ?
With a normal search, I can search for either 1 word or another and get hundreds of results. But it is in 1 file that both matches occur.
I studied a bunch of examples, but somehow they are all for more complex tasks, but I can’t solve such a simple one :/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-06-13
@bit24yes

If word1 always occurs first, followed by word2
(?s)word1.*?word2
If the word order can be any
(?s:word1.*?word2|word2.*?word1)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question