From: Patrick Hurley Date: 2007-06-03T13:56:05+09:00 Subject: Re: No way of looking for a regrexp match starting from a particular point in a string? On 6/3/07, Nobuyoshi Nakada wrote: > Hi, > > At Sun, 3 Jun 2007 12:59:24 +0900, > Kenneth McDonald wrote in [ruby-talk:254054]: > > 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. > > string.index(regexp, n) > > -- > Nobu Nakada > > I think he wanted MatchData objects. The String#index method returns the index (numeric position of the match). But if all you want are captures, then index is a good solution. pth