Community
    • Login

    How do I see the full line in Find results window?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 3.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • markshancockM
      markshancock
      last edited by

      I need to extract some specific lines from a very long log file. I have typically done this in Notepad++ by doing a search then copying the Find results window. Unfortunately, in this case, the lines I am interested in are VERY long (3743 characters) and notepad++ is truncating them to 1025 char in the Find results window.

      I suspect I could do this with a complex regex that deletes the lines I don’t want; but, that is going to take a lot of work to get right.

      Is there a way to increase the Find results line length?

      Alan KilbornA 1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @markshancock
        last edited by

        @markshancock said:

        Is there a way to increase the Find results line length?

        AFAIK, no. I, too have noticed that the maximum line-length in the Find result panel is around the number you cite. Anything longer and ... is added.

        One alternative is to use the Mark function and bookmark lines with hits. Then use the option to copy the bookmarked lines to the clipboard. Note that this only works if the regex you are using to search with doesn’t allow the match to span lines. If you do span lines with your search, there are some workarounds for that case, but let’s see what your need is first.

        1 Reply Last reply Reply Quote 3
        • Alan KilbornA
          Alan Kilborn
          last edited by

          So of course I experimented with this further and noticed some odd things…

          I created a file where each line (of random characters) had a length that matched its line number, excluding the line-ending characters.

          Thus:

          dCRLF
          a0CRLF
          V5jCRLF
          r3k6CRLF
          …

          I made the file 1050 lines long.

          I then executed this regex Find-All-In-Current-Doc search:

          (?-s)^.{1008}\K.{1,4}$

          I got hits on lines 1009 - 1012 (expected).

          • In the Find-result panel, for line 1009, the last character (in col 1009) was marked as a hit (expected). There was no ... for this entry.

          • In the Find-result panel, for line 1010, the ... output was introduced at the end of the line, and the last . was marked as a hit. This is maybe not so expected, as this is not real data that is highlighted, but at least the marking is in the correct position. Oh, but wait, for line 1011’s hit data, there is a single “something” highlighted after the space following the line # data; this seems to be a vestige from the line 1010 result data?

          • In the Find-result panel, for line 1011, it is similar to the line 1010 output (including the vestigal highlight on line 1012), but also has the position past the final . highlighted as well.

          Perhaps a picture of the above is best:

          Imgur

          If I open up the regex, say like this: (?-s)^.{1008}\K.+$ then nothing new occurs; the previous results patterns keep happening in the same way (as line 1011) on the extra lines that get hit.

          An aside: If the hit occurs to what would be off to the right of the ... (from a different search), then no highlight occurs in the result line (seems correct).

          Another aside: The column at which the ... output begins seems variable upon the number of digits in the line number, although I’m not going to say more that that because my testing of that aspect was inconclusive (i.e., I got a bit bored with it).

          1 Reply Last reply Reply Quote 2
          • Alan KilbornA
            Alan Kilborn
            last edited by

            Oh, and BTW before anyone asks, since the Find-result panel is just another Scintilla window, I turned on visible whitespace and line wrapping for it, to aid in showing the above analysis.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors