On Tue, Sep 11, 2012 at 4:44 PM, Vicente Bosch <[email protected]> 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/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google group. To post to this group, send email to 
[email protected]. To unsubscribe from this group, send email 
to [email protected]. For more options, visit this 
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to