Forum Replies Created

Viewing 7 posts - 76 through 82 (of 82 total)
  • Author
    Posts
  • tuska
    Participant

    Hi Mr KT,
    (?<![0-9])[24](?![0-9])
    works perfectly!
    Thank you very much.

    tuska
    Participant

    2Patrick 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…

    tuska
    Participant

    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.

    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).

    tuska
    Participant

    2LTT
    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 Sequence

    Is 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.

    tuska
    Participant

    Here is a picture:
    Multiple-line CTRL-ENTER Find-Replace

    tuska
    Participant

    However, 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.

    tuska
    Participant

    2Patrick 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

Viewing 7 posts - 76 through 82 (of 82 total)