Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #25959

    LTT
    Participant

    Multi(ple)-line search ≠ Multiple search

    #25960

    tuska
    Participant

    2LTT
    Many thanks for the comprehensive and detailed information.

    That box in Multiline mode is not a “list”, if you thought it was.

    Yes, I mistakenly assumed that.

    >… are marked in green.
    > EmEditor cannot highlight multi-line matches with colors.
    > A match will be highlighted with colors unless it’s multi-line.

    Yes, that’s why I wrote above:

    > Please regard this text as irrelevant.
    > That was a misunderstanding on my part.

    I think I understand the subject a little better now, but between theory and practice there’s still a gap with me.

    Example:
    1
    2
    3
    4
    5

    only matches as a whole:
    2
    3
    4

    1. RegEx –> OK
    2. Multiple-lines –> ?

    Please watch the video:
    20190707_13.32.43_Video__1368x836_00.02.24_Multiple-line string as a search string.wmv

    What am I doing wrong with “Multiline” or what else is a mistake of mine?

    #25962

    LTT
    Participant

    Great! According to your video, I think you’ve grasped almost anything!

    The failure was because you enabled “Treat CR and LF Separately” in “Advanced”.

    Read the last sentence at the bottom of this page:
    http://www.emeditor.org/en/howto_search_search_nl.html

    Let’s see if Yutaka will optimize the Multiline mode:
    https://www.emeditor.com/forums/topic/advanced-search-options/#post-25961

    I suggest you reset the Advanced options.
    Use them only when needed.

    #25963

    tuska
    Participant

    2LTT
    Thank you very much for your support!

    I have read everything from you carefully.
    Now everything is working as expected.

    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.

    Simple formulation for valid examples for CTRL + ENTER:
    – 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!

    Regards,
    Karl

    #25964

    LTT
    Participant

    Well, it’s just continuous text, if you have to use “cohesive”.

    Multiline mode is just for viewing/editing clearly, when the term in single-line mode includes “\n” and makes one dizzy.

    CTRL+ENTER is just for entering a newline character in that box. (= \n)
    CTRL+ENTER is not for triggering the search.

    You surely can use CTRL+ENTER at the end, if you want to search for a term that ends with a newline character(s).

    In the box is just continuous text.
    It’s not a list for searching 2 or more terms simultaneously.
    Compare it with “Advanced Filter” feature in Filter toolbar.

    #25965

    tuska
    Participant

    2LTT
    Thank you for the detailed description and clarification of this function!
    That’s how I understood this function now.

    I just wanted to make a short summary of this function for me as a reminder.
    —–
    Thanks again to everyone for their support!

    #25970

    tuska
    Participant

    Now I have one last question: Button “Extract” in the “Find”-window:
    ☑ Use Output Bar | Extract Options: Display File Names and Lines

    Example:
    9
    09
    2
    4
    24
    42
    123
    5467
    —-
    ◉ Regular Expressions: (?<![0-9])[24](?![0-9])
    Klick on button “Find Next” and then on “Extract” brings “Output”:

    “(?<![0-9])[24](?![0-9])” Untitled-3

    Untitled-3(4): 2
    Untitled-3(5): 4

    Test: OK
    —-
    ◉ (None) – ☑ Multiline
    Same example: 2 Ctrl+enter, 4 Ctrl+enter
    Klick on button “Find Next” and then on “Extract” brings “Output”:

    “2
    4
    ” Untitled-3

    Untitled-3(4): 2

    Untitled-3(5): 4 seems to be missing for me in “Output”-box
    —-
    ◉ Escape Sequence – without Multiline
    Same example: 2\n4\n
    Klick on button “Find Next” and then on “Extract” brings “Output”:

    “2\n4\n” Untitled-3

    Untitled-3(4): 2

    Untitled-3(5): 4 seems to be missing for me in “Output”-box
    —-
    With the remaining three options in “Extract Options…” I suspect partially similar combinations,
    i.e. only a partial output in the “Output” box.
    —-
    For me there would be one line missing in the “Output” box in the example above.
    Can someone please confirm this or tell me how to understand this constellation?

    #25971

    tuska
    Participant

    On a second thought:
    Probably only the first line in which the continuous text starts is displayed in multi-line mode.
    More is actually not necessary.

    #25983

    LTT
    Participant

    If your Extract Option is “Display … Lines …”, EmEditor displays only the first line of each match in the search result.
    Though “Number of Additional Lines Above/Below Matched Lines” option can be used, the additional lines are displayed with the same format.

    I think the Extract function is mainly for single-line/string extracting.
    You can submit suggestions if you need to extract multi-line text.

    #25984

    tuska
    Participant

    2LTT
    Thank you for this additional tip!
    But I won’t make a suggestion, because the existing functions are sufficient for me.

Viewing 10 posts - 16 through 25 (of 25 total)

You must be logged in to reply to this topic.