Robert Klemme wrote:
> All method parameters are evaluated before method invocation - this is
> true for every method invocation in Ruby.
> 
>> but the block is passed as code, so then it is evaluated after.
> 
> In the case of gsub the block is invoked once for each match.

This are really important details to understand.  Thanks for pointing 
them out.

> Basically you need an alternative and more capturing groups along the 
> lines of
> 
> '([^']+)'|"([^"]+)"

Ah, of course.  I knew that, but didn't put it together.

I am so appreciative of the folks on this list.

Thank you 7stud, Sebastian & Robert!

Sarah
-- 
Posted via http://www.ruby-forum.com/.