From: 7stud -- Date: 2009-08-17T14:25:46+09:00 Subject: Re: Reading contents of a file and storing 7stud -- wrote: > Shekar Ls wrote: >> >> Since i am new to programming lang, i dont know how to write a regex. >> I am looking for output like this >> >> a = "http://localhost" >> b = "User@htmdec.com" >> >> where a & b are variables i am storing these values into. > > You would never do that. Well, I guess that's not true. You can do this: results = ["hello", "hi", "goodbye"] a, b, c = results puts a, b, c --output:-- hello hi goodbye -- Posted via http://www.ruby-forum.com/.