I'm looking for a software that, given several text files (a few thousands actually), it will find all the occurrences of strings that are exactly the same without knowing the string in advance (it probably needs to set up a string length to analyze).
For example, let's say I have
file1.txt
1234567890 hello test
Lorem ipsum dolor sit amet
file2.txt
hello test
file3.txt
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut faucibus turpis urna. Donec vel tincidunt enim. Phasellus blandit massa at dolor faucibus ultricies.
And then I somehow "ask" this software to "find all the occurrencies of equal strings that are 10 characters long" it will tell me that file1 and file share the "hello test" string while file1 and file3 have the "Lorem ipsu" string in common.
I then ask for equal strings of length 20, it will show me that file1 and file3 share the string "Lorem ipsum dolor si" while file2 has no string of such length.
Mind that the files might be completely different except for one string, so using a diff tool on all the files to find those that are most similar will not work
Extra but not required:
1) Be able to specify the length in words rather than characters (so that i can specify "find the strings that have 6 words in common"
2) Be smart enough to even find similar strings (much like some diff tools), that is, strings that might differ for a word or two, or maybe they have some non-shared words in the middle of a string. (like, for example "Lorem ipsum test 123 test dolor sit amet" and "Lorem ipsum dolor sit amet" will be matched)
I'm looking for something that can be used on windows, but i have installed bash on this system so i can run linux command line tools if required.
I'm also open to paid solutions if they don't cost too much (no more than 40€) and do not require a recurring subscription
Thanks in advance
EDIT: I have found out that this kind of software is used to check plagiarism on papers, research documents and similar. I have found Plagiarism Checker x https://plagiarismcheckerx.com/ Which does what I need (using the cross comparison) and costs about 40 dollars, i bought it but when i tried to add all my documents (4k, and it lets you add about 150 at a time) it crashed when I was almost done adding the documents. Then i tried to analyze 150 documents and it took almost half a day. But it did what I required, except not as efficiently as I thought. I'm not posting this as answer because it didn't complete the task I need to do