From: Pit Capitain Date: 2004-09-23T04:55:47+09:00 Subject: Re: not greedy enough trans. (T. Onoma) schrieb: > Right now I'm working on this: > > /^[ ]*[-](.*\n)+.*\n/ > > Applied to: > > %Q{ > - xyz > - abc > > - not this > } > > I want it to match just the first section, essentially > > " - xyz\n - abc\n\n". > > But it's matching the whole string. Can any of you Regexp experts fill me in? The repeating group in your regexp is (.*\n)+ and this matches every line. You have to enlarge this group as in /^( *-.*\n)+.*\n/ HTH Pit