Regex search for words near each other across multiple line breaks

\bword1\W+(?:\w+\W+){1,200}?word2\b
The above regex search only works on one line. It cannot search past the line break or carriage return of the line that contains word1. How can I modify it to search beyond the line break or carriage return?

Thank you for looking at this!

Alternative Find & Replace By Tomáš Bílek

from : Using Regular Expressions in Text Searches

A search using a regular expression will work only within one paragraph. That is, a \n will match a line break within a paragraph.

duckduckgo: regex…