From: Josh Cheek Date: 2011-11-16T15:21:26+09:00 Subject: Re: Regex to divide document into sections? --0016364eff06f5580204b1d41c26 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 15, 2011 at 11:53 PM, Intransition wrote: > The actual content shouldn't really matter. Sorry, I should have been more > clear about that. The key pattern that the regexp would have to depend on > is the indentation. > > I would think there is a way, but I've tried a few times to get this and > never quite get it. Maybe this is something that regexp's just can't do? > > This is very close. p DATA.read.split(/^\b/) __END__ This is an example. a = 1 Of what I mean. b = 2 And it can go on like this. c = 3 For ever and ever. d = 4 So how does one parse it? --0016364eff06f5580204b1d41c26--