You may find this helpful:<br><br><a href="http://en.wikipedia.org/wiki/Longest_common_substring_problem">http://en.wikipedia.org/wiki/Longest_common_substring_problem</a><br><br>Just substitute digits with minus (and plus too if you allow it) as the alphabet instead of letters.  I think you'd make two copies of the string and find the common substrings that don't start at the same position.<br>
<br>These algorithms were what I was originally thinking of, but that's if you know the substring you're searching for:<br><br><a href="http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=stringSearching">http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=stringSearching</a><br>
<a href="http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm">http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm</a><br clear="all"><br><br>Karen<br>