• Login
Community
  • Login

find and compare single word notepad++

Scheduled Pinned Locked Moved General Discussion
7 Posts 3 Posters 457 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.
  • D
    Derek Tsuze
    last edited by Dec 11, 2022, 7:49 AM

    I’m trying to find highlight and compare the word “<end>” in two of my files

    In the original file there are 25651 matches for <end> in my edited file there are only 25650 matches for <end>

    trying to find a way to find the last missing <end> without scrolling through 136,000 lines of code

    T 1 Reply Last reply Dec 11, 2022, 8:25 AM Reply Quote 0
    • T
      Terry R @Derek Tsuze
      last edited by Dec 11, 2022, 8:25 AM

      @Derek-Tsuze said in find and compare single word notepad++:

      trying to find a way to find the last missing <end> without scrolling through 136,000 lines of code

      Presumably you have verified there are the same number of lines in each. My next thought was if there are equal lines in each that suggests one of your <end> is mistyped.

      So perform a count on \bend\b. As this is a regular expression search mode MUST be regular expression. If the count increases by 1 from the previous count then a mistype seems likely. I’m not on a PC currently so unable to create the next regex which would look for this.

      Terry

      D 1 Reply Last reply Dec 11, 2022, 8:46 AM Reply Quote 2
      • D
        Derek Tsuze @Terry R
        last edited by Dec 11, 2022, 8:46 AM

        @Terry-R said in find and compare single word notepad++:

        @Derek-Tsuze said in find and compare single word notepad++:

        trying to find a way to find the last missing <end> without scrolling through 136,000 lines of code

        Presumably you have verified there are the same number of lines in each. My next thought was if there are equal lines in each that suggests one of your <end> is mistyped.

        No, if any of my <end> where mistyped the compiler would catch it.
        it’s just one line that’s missing an <end>

        T 1 Reply Last reply Dec 11, 2022, 8:53 AM Reply Quote 0
        • T
          Terry R @Derek Tsuze
          last edited by Dec 11, 2022, 8:53 AM

          @Derek-Tsuze

          Another idea is to number all lines in both files. Then extract just the lines with the <end> in them.

          Now you only need to compare a smaller number of lines. Sorry as not on PC I can’t give much else.

          Terry

          1 Reply Last reply Reply Quote 0
          • D
            Derek Tsuze
            last edited by Dec 11, 2022, 9:28 AM

            is there not a way to compare the two files to find exactly where this one missing word is located at?alt text

            A 1 Reply Last reply Dec 11, 2022, 11:38 AM Reply Quote 0
            • A
              Alan Kilborn @Derek Tsuze
              last edited by Dec 11, 2022, 11:38 AM

              @Derek-Tsuze said in find and compare single word notepad++:

              is there not a way to compare the two files

              There are some comparing plugins:

              0345357b-82dc-415a-95a3-3480fcadca7c-image.png

              Start with ComparePlus.

              1 Reply Last reply Reply Quote 2
              • D
                Derek Tsuze
                last edited by Dec 11, 2022, 12:01 PM

                i found the missing <end> tag manually at the file’s pointer

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