Notepad++ find written words or phrases
-
Friends like I mentioned above; For example, I have thousands of words and phrases
in a notebook. You need a way to detect how many of these words and phrases are the
same without doing “CTRL + F” without! If you do not understand, you can browse
through pictures below.https://i.hizliresim.com/g95400.png
https://i.hizliresim.com/rJQdJ7.pngI would be glad if you help.
-
CTRL + ALT + i
Start typing, results are shown on right. -
@decoderman I know the way you do, master, I need a different method! For example; A method that automatically displays a similar word or sentence.
-
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. -
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 -
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.
-
@Claudia-Frank Thank you very much, your method worked. But it is very difficult to search thousands of words and sentences one by one.
-
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 -
@Claudia-Frank I’m sorry master, my English is bad. :(
Was this picture helpful? —> https://i.hizliresim.com/lb7OZQ.png
-
@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 -
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:
into this:
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. :-)
-
@Scott-Sumner Thank you so much to all my friends it worked! ^^
-
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
andCtrl + 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 REPLACELeave EMPTY
- SEARCH
-
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
- SEARCH
-
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)
- SEARCH
-
Finally, delete the last part ( coming from the initial copied text )
Cheers,
guy038
-