What are the minimum and maximum substring lengths you need to work with for your real data? With what you imply here this is never going to be a fast task! Oh, and you still haven't told us what you are trying to do! The more detail you give us about what you are trying to achieve the better we can help. So far you really haven't given us much.
You may be interested in Fast common substring matching which attempts to solve a problem that on the face of it may be similar to the problem you are working on.
In reply to Re^4: Exact string matching
by GrandFather
in thread Exact string matching
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |