#25947
LTT
Participant

Ctrl+Enter (in Multi-line mode) = \n (in Single-line mode).

If you want to search for a multi-line string, usually you have to match the exact number of the lines:

2\n.*\n4 matches:
2
anything
4

2\n.*\n.*\n4 matches:
2
anything
anything
4

All in this post are Regular Expressions:
http://www.emeditor.org/en/howto_search_search_regexp_syntax.html

And note that EmEditor cannot highlight multi-line matches with colors.

—————
If the number of lines is uncertain, open “Advanced…”:

Additional Lines to Search for Regular Expressions:
Enter a number (the maximum for your case).
[★The help for this option is important.]
(Don’t forget that in such dialog boxes you can press F1 for help.)

** But currently you have to relaunch EmEditor to make the change effective. (It could be a bug.)

Expression 1:
2[\s\S]*4 should now work for you.

Expression 2:
Open “Advanced…”:
Enable: Regular Expressions “.” Can Match Newline Characters.
2.*4 should also work now.

—————
While “Find in Files” is different:
(It doesn’t need “Additional Lines to Search for Regular Expressions”.)

2[\s\S]*4 always works.

2.*4 works only if you enable the option:
Regular Expressions “.” Can Match Newline Characters.
[★The help for this option is important.]

I have to say the design for such multi-line searches in EmEditor is complicated and inconvenient…