"Bill Kelly" <billk / cts.com> wrote in message 
> 
> Sorry.  (That's what I get for writing a one-liner without any
> unit tests:)

:)

I took the excuse to pore over the extended regexp documentation and
play with the features until I understood them properly. This seems to
be the simplest way to do it:

 m = "#{Regexp.quote(l)}.*?#{Regexp.quote(r)}"
 s.scan(/#{m}|(?:.(?!#{m}))*./m)

Though I just discovered the even simpler (but undocumented!)

 s.split(/(#{m})/)

Still, all in all the regexp workout was well worth the effort -
thanks for the help!

-- 
Martin DeMello