Hi all, How to find out pattern'cat' in this string='ccccatgggctacatgggtcat' ? There are three 'cat' within the string and I want to return the position of each match. Although # match return the match , #pre_match and #post_match do the tricks but they only work for the first match. How about the 2nd, third match, and more? I try #scan(pattern) but it doesn't return the position for each match. I wonder how other handle this problem. Thanks, Li -- Posted via http://www.ruby-forum.com/.