All right...
Please, someone with a lot of knowledge or talent, or someone with a vast knowledge of quantum dynamic physics,
Lets say I have this block of text:
abcdefg0348u59u609uabcdefgkjlkjlkjh987abcdefg98y9iuh98gabcdefg798t876576576fabcdefgkgyuf876509876abcdefggugouabcdefg87tr5876abcdefggabcdefgjhg876abcdefggfgi76r5abcdefgkjlh9876abcdefg\abcdefgjhg7986abcdefg
NOW, notice that 'abcdefg' is repeated all though-out this block of text, but not in any sort of pattern.
Lets say this block of text is dynamically generated, and next time 'abcdefg' could be 'zyx123987'.
Is there any way, that I can search the string of text for duplicated text and then return what the most duplicated piece of text or word is? Of course without knowing what it will be to begin with?
An operation example would be: taking the most duplicated text, and replacing it with # , to cut down on the size of the text block for transport.
so something that is:
12345678a12345678b12345678c12345678d12345678e12345678f12345678g12345678h12345678i
could be cut into 1/4 - 1/3 of its length:
#a#b#c#d#e#f#g#h#i
and recombined later, after transport:
12345678a12345678b12345678c12345678d12345678e12345678f12345678g12345678h12345678i
Can anyone help me on this one? I have given it all the thought I can muster alone.
I would be happy if there is a php function to do this, and I just do not know about it.
Thanks In advance!