From: Harry Kakueki Date: 2007-06-03T13:46:50+09:00 Subject: Re: No way of looking for a regrexp match starting from a particular point in a string? On 6/3/07, Kenneth McDonald wrote: > > What I want is just something like regexp.match(string, n), where the > regexp starts looking for a match at or after position n in the string. > > > Thanks, > Ken > > You could match the string but ignore the first part of the match. str = "abcdefghabcehjjjuabcfjkiabcgdfg" str =~ /(abc.)/ p $1 # abcd str =~ /a.*ju(abc.)/ p $1 #abcf Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/