Kirk Haines wrote:
> On Fri, 9 Jul 2004 01:21:29 +0900, Kirk Haines wrote
> 
> 
>>My Ruby-fu is failing me at coming up with a relatively concise yet 
>>readable way to do this in Ruby.  My implementation is, I am sure, 
>>much longer than necessary.
>>
>>So, anyone have any ideas?  How would you do this?
> 
> 
> And....nevermind.  I figured out where I was being thick.  gsub with a block 
> works nicely.
> 
> 
> Kirk Haines
> 
> 
> 

We ran into the same question earlier today.  Maybe the documentation 
for String.sub() should mention String.gsub().  I think it would have 
been more intuitive to have an optional parameter to sub() for 
global/case-insenstive/etc.