in reply to Re: Regex not greedy enough
in thread Regex not greedy enough

It won't match (?=^ANYTHING) at any place but the very beginning of the string unless you have the /m modifier on in the regex, which allows ^ to match after newlines.

Ohhhhhh. I didn't think you meant ALL the text was indented, I thought you meant the 'field' parts where. Well then, to make it work with such data:
my $code; { local $/; $code = <DATA> } # fast "slurping" @records = split /\n (?=\w)/, $code; for (@records) { print ">>$_<<\n"; } __DATA__ japhy DALnet regular Regex Prince merlyn Perl Hacker O'Reilly Author Mark_Dominus IAQ Author ArrayHashMonster Creator


japhy... Perl Hacker and Regex Prince