From: Robert Klemme Date: 2012-09-12T03:26:45+09:00 Subject: Re: String iterate through regex matches with possition On Tue, Sep 11, 2012 at 4:44 PM, Vicente Bosch wrote: See Jan's reply for obtaining the position. > Maybe I should not even be using scan ? If you need to process the content in between then you could also use #split: m = string.split /((?:SP)\s(?:NL\s)*EP)/ (When #split is used with capturing groups those are retained in the resulting array.) Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/