From: Clay Tzoucalis Date: 2012-04-26T04:48:31+09:00 Subject: matching substrings I need a little help with an assignment. Following is the code I am being asked to create, any help with this would be great. Ask the user to enter two strings, a and b. Then return the number of positions where they contain the same length 2 substring. So “xxcaazz” and “xxbaaz” yields 3, since the “xx”, “aa”, and “az” substrings appear in the same place in both strings. string_match('xxcaazz', 'xxbaaz') → 3 string_match('abc', 'abc') → 2 string_match('abc', 'axc') → 0 -- Posted via http://www.ruby-forum.com/.