From: Robert Klemme Date: 2013-07-05T00:05:28+09:00 Subject: Re: Split string --047d7b6d9a6a8af09804e0b0e854 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jul 4, 2013 at 2:59 PM, xcoder Blue_fox wrote: > hey Guys i need to split this query to string array how contains three > strings : > query = "Get /index.html HTTP/1.0\r\n\r\n" > query += "Host: www.example.com\r\n" > query += "Connection: Close\r\n\r\n" > i want to get result like > array[0] >>> Get /index.html HTTP/1.0 > array[1] >>> Host: www.example.com > array[2] >>> Connection: Close > I am pretty sure you'll find that functionality in Webrick. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --047d7b6d9a6a8af09804e0b0e854 Content-Type: text/html; charset=ISO-8859-1



On Thu, Jul 4, 2013 at 2:59 PM, xcoder Blue_fox <lists@ruby-forum.com> wrote:
hey Guys i need to split this query to string array how contains three
strings :
query = "Get /index.html HTTP/1.0\r\n\r\n"
query += "Host: www.example.com\r\n"
query += "Connection: Close\r\n\r\n"
i want to get result like
array[0] >>> Get /index.html HTTP/1.0
array[1] >>> Host: www.example.com
array[2] >>> Connection: Close

I am pretty sure you'll find that functionality in Webrick.

Cheers

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
--047d7b6d9a6a8af09804e0b0e854--