Community
    • Login

    Notepad++ find written words or phrases

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    13 Posts 5 Posters 43.4k 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.
    • decodermanD
      decoderman
      last edited by

      If you want the same behavior as Firefox search as in one of your images, why not open the file in Firefox?
      You can drag the file into the Browser.

      1 Reply Last reply Reply Quote 1
      • Claudia FrankC
        Claudia Frank @Alp Koski
        last edited by

        @Alp-Koski

        it looks like you only want to see where those words or phrases are, correct?
        If so, double click the word and it gets highlighted or select a phrase and use style token feature.

        Cheers
        Claudia

        Alp KoskiA 1 Reply Last reply Reply Quote 3
        • Scott SumnerS
          Scott Sumner @Alp Koski
          last edited by

          @Alp-Koski

          With your use of the word “similar” it makes me think you are asking too much of Notepad++, like expecting it to read your mind about what you want. You have to define what you want in concrete terms the program can understand. That being said, @Claudia-Frank 's suggestions are good ones. Maybe also try the Search (menu) -> Mark… feature and create some regular expressions in order to obtain your desire for “similar” matches. I’m sensing, however, that this isn’t going to be a good suggestion for you.

          1 Reply Last reply Reply Quote 2
          • Alp KoskiA
            Alp Koski @Claudia Frank
            last edited by

            @Claudia-Frank Thank you very much, your method worked. But it is very difficult to search thousands of words and sentences one by one.

            https://media.giphy.com/media/l3fZFoex2m87dR5ja/giphy.gif

            Claudia FrankC 1 Reply Last reply Reply Quote 0
            • Claudia FrankC
              Claudia Frank @Alp Koski
              last edited by

              @Alp-Koski

              if this doesn’t suite you, than maybe you wanna rephrase your question what exactly you try to achieve.
              Do you need some kind of statistics which word is used most or which sentences
              occurs how many times etc…
              If you need this kind of information than you need to use plugins like python script
              or lua script etc. and write some analysis script.

              If I misunderstood your last reply - just ignore mine :-)

              Cheers
              Claudia

              Alp KoskiA 1 Reply Last reply Reply Quote 1
              • Alp KoskiA
                Alp Koski @Claudia Frank
                last edited by

                @Claudia-Frank I’m sorry master, my English is bad. :(

                Was this picture helpful? —> https://i.hizliresim.com/lb7OZQ.png

                Scott SumnerS 1 Reply Last reply Reply Quote 0
                • decodermanD
                  decoderman
                  last edited by

                  @Alp-Koski if you change the subject with every answer we give you then this could be an endless thread.
                  You look for a duplicate finder according your latest screenshot?
                  Here it is:
                  https://notepad-plus-plus.org/community/topic/10601/is-there-a-way-to-search-for-duplicate-records-in-notepad

                  1 Reply Last reply Reply Quote 2
                  • Scott SumnerS
                    Scott Sumner @Alp Koski
                    last edited by

                    @Alp-Koski

                    The spec does seem to keep changing, but it may be instructive to use the most recent screenshot to see how an analysis can be done. That screenshot seems to indicate a desire to find duplicates with the condition that the first three columns are ignored. A variation on the regular expression that finds duplicate lines can be used for this (although it won’t find the LAST occurrence of a “duplicate”). Consider this regular expression:

                    (?-s)^...(.+)(?:\R)(?s)(?=.*^...\1\R)

                    Using the Search (menu) -> Mark… function (with bookmarking enabled) together with the above regex will turn the view of text of this form:

                    Imgur

                    into this:

                    Imgur

                    Note that it has marked the line data that is the same without regard to the first 3 columns, and again, doesn’t do the LAST occurrence of each “dupe”.

                    @Alp-Koski , maybe this helps you…maybe not. :-)

                    Alp KoskiA 1 Reply Last reply Reply Quote 1
                    • Alp KoskiA
                      Alp Koski @Scott Sumner
                      last edited by

                      @Scott-Sumner Thank you so much to all my friends it worked! ^^

                      https://media.giphy.com/media/d3mlE7uhX8KFgEmY/giphy.gif

                      1 Reply Last reply Reply Quote 0
                      • guy038G
                        guy038
                        last edited by guy038

                        Hello, @alp-koski, @decoderman, @scott-sumner, @claudia-frank and All

                        Scott, a solution, a bit complex, for marking the last duplicates, of the user’s text, could be :

                        • Duplicate all the text, just after the present one, by the actions Ctrl+A, Ctrl + Fin and Ctrl + V

                        • On that copied text, exclusively :

                          • Suppress all the lines, which do not have a duplicate, with the global regex replacement :

                            • SEARCH (?-s)^...(.+\R)(?s)(?!.*\R(?-s)...\1) and REPLACE Leave EMPTY
                          • Execute an ascending lexicographically sort ( Add a line break to the last sorted line, if necessary )

                          • Suppress all the lines, which do have a duplicate, with the global regex replacement :

                            • SEARCH (?-s)(.+\R)\1+ and REPLACE \1

                        At this point, the copied text should contain, only, all the lines of text, having duplicate(s)

                        • Then, on all the file contents, perform the global mark action, with the regex :

                          • SEARCH (?-s)^....(.+\R)(?s)(?=.*\R(?-s)....\1)
                        • Finally, delete the last part ( coming from the initial copied text )

                        Cheers,

                        guy038

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