From: Jamey Cribbs Date: 2008-09-29T10:11:47+09:00 Subject: Re: string#sub all instances of pattern??? try gsub instead of sub. Jamey On Sun, Sep 28, 2008 at 9:04 PM, Nick Bo wrote: > eg: str = "a b c d" > newStr = str.sub(" ", ", ") > > gives me output a, b c d > > what i want is a, b, c, d > > ow do i make this happen sub isnt doing it for me i guess. I been > looking all through the ruby-doc to no avail. > -- > Posted via http://www.ruby-forum.com/. > > >