0

I am searching text files that contain:

-any word in this list (build|tune|scrap)
-and one more specific word (engine)

The text files have CRLF as line endings.

I've cobbled together the following regex, which matches when engine is on the same line as one of the first three:
(?=.*\b(build|tune|scrap)\b).*(?=.*\b(engine)\b)

edit: I've tried the suggested duplicate post. The files I am searching have CRLF line endings, so I believe my regex should have \r\n someplace, but I have been unable to get it to find engine in the rest of the text (i.e. on other lines) when there's a build, tune or scrap anywhere else.
(?=.*\b(build|tune|scrap)\b)((.|\n|\r)*)(?=.*\b(engine)\b)
(?=.*\b(build|tune|scrap)\b)((|\n|\r))(?=.*\b(engine)\b)

Thanks.

binsworth
  • 31
  • 3

0 Answers0