From: Daniel Finnie Date: 2008-04-19T11:20:54+09:00 Subject: Re: line breaks in multiline regexp Hi, I see that Rob posted a response to this but his email came thru blank for me so I will answer again. Hopefully I'm not repeating his info. "\n" is a line break and only a line break. So to detach those lines you would do: s = s.split(/\n{3}/) s[0] #=> a looongtest...many spaces...followed by 3 empty lines, etc. s[1] #=> this line must be detached... Dan On Fri, Apr 18, 2008 at 9:25 AM, Andrey Chaschev wrote: > Hi! I really want to know how to denote line breaks in multiline regexp. > > The problem is that \s is not only a line break. > > I.e. how to parse this in a general way? > > s=< a loooong-loooong text with > MANY spaces and *single* line breaks > followed by three empty lines > > > this line must be detached from the previous > HERE > > Thanks in advance! > -- > Posted via http://www.ruby-forum.com/. > >