From: Robert Gleeson Date: 2009-12-14T06:50:57+09:00 Subject: Re: gsub help Hi, This isn't particularly efficient or clever, but it should work: "john crichton 555-555-1234 ^A street name with spaces^ 12345".scan(/(\w+) (\w+) (\S+) \^(.+)\^ (\d+)/).join ',' - Rob -- Posted via http://www.ruby-forum.com/.