Forum Replies Created
- AuthorPosts
- July 6, 2019 at 2:07 am in reply to: Multiple-line string as a search string in the Find/Replace dialog box #25956
tuska
ParticipantHi Mr KT,
(?<![0-9])[24](?![0-9])
works perfectly!
Thank you very much.July 5, 2019 at 1:50 pm in reply to: Multiple-line string as a search string in the Find/Replace dialog box #25954tuska
Participant2Patrick C
Thank you for your code, which is the solution for my example above.
Your example also finds the number 42 – this should not be found.I don’t know if there is a solution:
Only 2 and 4 should be found, i.e. exactly:2 and exactly:4.If there are any combinations in which the numbers 2 and 4 are contained,
such as 1024, 42, 4242, 1524, 2415, 124215, 754224, etc., then the numbers should not be found/marked.regex101 dot com is also my favorite site because it offers explanations – but I am a complete beginner…
July 5, 2019 at 8:45 am in reply to: Multiple-line string as a search string in the Find/Replace dialog box #25951tuska
ParticipantIf you want to search for a multi-line string, usually you have to match the exact number of the lines:
Does this mean that I have to go to the end of each text document before searching to determine the exact number of lines?And note that EmEditor cannot highlight multi-line matches with colors.
Mmmh, with
☑ Multiline
◉ Regular Expressions
(^2$|^4$)
in a .txt file the numbers 2 and 4 are marked in green.Please regard this text as irrelevant.
That was a misunderstanding on my part.For me, there are currently only two questions left unanswered:
– CTRL + ENTER (see previous post)
– Exact search for a number with RegEx, e.g. find 2 and 4 in a range from 1,2,3,4,5,24 (see previous post).July 5, 2019 at 7:31 am in reply to: Multiple-line string as a search string in the Find/Replace dialog box #25950tuska
Participant2LTT
Thank you very much for your examples with RegEx and efforts to bring the topic closer to me.
Unfortunately, I’m afraid I’m more confused now than before.Ctrl+Enter (in Multi-line mode) = \n (in Single-line mode).
If I do CTRL + ENTER as in the picture above, I won’t get any results with the following options:
☑ Multiline
◉ (None)
◉ Regular Expressions
◉ Escape SequenceIs this a bug of EmEditor or an application error of mine?
Are multi-line queries only allowed with the option ◉ Regular Expressions?If you want to search for a multi-line string, usually you have to match the exact number of the lines:
Does this mean that I have to go to the end of each text document before searching to determine the exact number of lines?
And note that EmEditor cannot highlight multi-line matches with colors.
Mmmh, with
☑ Multiline
◉ Regular Expressions
(^2$|^4$)
in a .txt file the numbers 2 and 4 are marked in green.In the example in the picture I wanted to find exactly the numbers 2 and 4 in a range from 1 to 5, with or without RegEx.
To complicate matters, I would also like to add the number 24 to the list and this number should not be marked.
Unfortunately, I do not know how it would be possible to make an exact definition, so that only numbers 2 and 4 would be marked.Perhaps it would be possible if you or someone else could answer these questions for me.
July 4, 2019 at 2:06 am in reply to: Multiple-line string as a search string in the Find/Replace dialog box #25942tuska
ParticipantHere is a picture:
July 3, 2019 at 2:19 pm in reply to: Multiple-line string as a search string in the Find/Replace dialog box #25941tuska
ParticipantHowever, I still don’t know what a solution without RegEx knowledge looks like,
i.e. for which example CTRL + ENTER is to be used.Please support me on this question.
July 3, 2019 at 2:11 pm in reply to: Multiple-line string as a search string in the Find/Replace dialog box #25940tuska
Participant2Patrick C
Thank you for your solution.On my PC the following is marked in EmEditor (in a .txt file):
2 4 24
and I am very happy with that (because it is the first time that anything is marked at all).
How I can find e.g. with RegEx
– exact number 2 and 4
– the number 2 and 09
I have to learn first (RegEx).Thanks again.
Regards,
Karl - AuthorPosts