Multiline Regular Expression -OR- (None) - not work

Off-topic posts of interest to the "Everything" community.
Post Reply
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Multiline Regular Expression -OR- (None) - not work

Post by Debugger »

Find:
09
9
7


Enable: Multiline
Enable: Regex

[09]
[7]

EmEditor


OR

Find:
09
9
7

Enable: (None)
Enable: Multiline
7
9


http://www.emeditor.org/en/faq_search_s ... _line.html

It never worked for me.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Multiline Regular Expression -OR- (None) - not work

Post by tuska »

Hi,
I was also interested in this topic and registered for the EmEditor forum via the contact form.
Here is the previous result of my request:
https://www.emeditor.com/forums/topic/m ... post-25938

Based on your example, the solution could look like this: (^09$|^9$|^7$) or shorter: ^(09|9|7)$ ... (bloody beginner in RegEx ) ...
On the website https://regex101.com/ you can readjust the example and on the right you will find explanations of the parameters.
2019-07-05_EmEditor_Multiple-line CTRL-ENTER Find_RegEx.png
2019-07-05_EmEditor_Multiple-line CTRL-ENTER Find_RegEx.png (73.75 KiB) Viewed 21582 times
---------------------------------------------------------------------------------------------------------------------------------
Personally, I would be interested to know if you or someone else knows how to perform an exact search for a number with RegEx.

Example:
1
2
3
09
09 blank 09 4
4
 4    (Space before the number 4)
 4    (Space(s) before and after the number 4)
24
5

2, 4 and 09 are to be found.
24 should NOT be found!

Solution approaches:

Code: Select all

(2|4|09)	--> 24 is also found - unwanted!
[2|4|09]	--> 24 is also found - unwanted!
(2+?|4+?|09+?) 	--> 24 is also found - unwanted!
Anybody have a solution?
---------------------------------------------------------------------------------------------------------------------------------
Regarding the variant CTRL + ENTER in the search window in EmEditor I'm still waiting for a reply in the EmEditor Forum.
After receipt I will give you the answer here.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Multiline Regular Expression -OR- (None) - not work

Post by tuska »

Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Multiline Regular Expression -OR- (None) - not work

Post by Debugger »

You can see that the normal search and search in many lines is practically no different, and it does not make this task any easier. But here we are talking only about regular expressions! What if I am looking for something in many lines without a regular expression? Multiline then does not apply here.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Multiline Regular Expression -OR- (None) - not work

Post by tuska »

For me a lot is still unclear and I am in the process of formulating my questions.
Please be patient.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Multiline Regular Expression -OR- (None) - not work

Post by tuska »

2Debugger

Please
- watch the video: https://1drv.ms/v/s!Ah1sWOWAFm-diECGWJl ... _?e=89Vdeo (to get an impression...) and
- read the solution: "Advanced" Treat CR and LF Separately ... and hints:
  https://www.emeditor.com/forums/topic/m ... post-25962
- See also the RegEx examples above (in EmEditor forum) for this topic

For me personally, I have noted the following as a brief summary *:
With CTRL + ENTER and option "Multiline" in the "Find"-window, it is possible to search for a cohesive search term over several lines.
* Here is a detailed description of this function: https://www.emeditor.com/forums/topic/m ... post-25964

Simple formulation for valid examples for CTRL + ENTER and option "Multiline":
- Example1: 1,2,3,4,5 --> Search for: 2,3,4 (and not for 2,4) --> DO NOT press CTRL+ENTER after 4!
- Example2: abc def, ghi jkl, mno pqr --> Search for: (1)def (2)ghi jkl (3)mno --> after mno do NOT press CTRL+ENTER anymore!

For me this topic is done.
2019-07-07_Multiple-line CTRL-ENTER.png
2019-07-07_Multiple-line CTRL-ENTER.png (100.37 KiB) Viewed 21569 times
Attachments
2019-07-07_Without Multi-line.png
2019-07-07_Without Multi-line.png (40.84 KiB) Viewed 21569 times
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Multiline Regular Expression -OR- (None) - not work

Post by Debugger »

tuska - There is no "Undo all changes in all documents" option.
In case you accidentally Replace something with the "Search All Documents in the Group" option enabled.

Undo (but NOT [Undo All])
ALT+Backspace
or
CTRL+Z
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Multiline Regular Expression -OR- (None) - not work

Post by NotNull »

tuska wrote: Sun Jul 07, 2019 10:44 pm For me this topic is done.
Debugger wrote: Tue Jul 16, 2019 7:32 am tuska - There is no "Undo all changes in all documents" option.
@Debugger:
There are very few people left that are still willing to help you with your off-topic questions on this forum (*).
tuska is (was?) one of them.
Don't push your luck ...

(*)Except for spammers; somehow they have an above-average tendency to react to your posts specific.
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Multiline Regular Expression -OR- (None) - not work

Post by Debugger »

If something is not in EmEditor, it does not mean it can not be. From what I know, you can write "Macro" for "Undo All". Unfortunately, I do not have any knowledge of writing Macros. I proposed this function to the author of the program in 2017, he assured me that he would implement it sometime.

Rather, it's not the same, although I'm not sure if it works on all tabs. The author did not mention anything about it.
Image
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Multiline Regular Expression -OR- (None) - not work

Post by tuska »

Debugger wrote: Tue Jul 16, 2019 7:32 am tuska - There is no "Undo all changes in all documents" option.
In case you accidentally Replace something with the "Search All Documents in the Group" option enabled.

Undo (but NOT [Undo All])
ALT+Backspace
or
CTRL+Z
I can't really connect this topic (Undo...) to "Multiline Regular Expression -OR- (None) - not work"
and therefore did not reply immediately to your contribution.

Personally, I don't want to discuss other options from the "Search" window in EmEditor under this topic.
I am only a hobby-user and for me this topic (Multiline...) is done.

If someone is still interested in the original topic - there was a minimal continuation in EmEditor forum...

Regards
Karl
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Multiline Regular Expression -OR- (None) - not work

Post by Debugger »

Unfortunately, it will be an awkward case to search for 6000 names with 11 characters in the name. About 70000+ length of regular expression!
Post Reply