From: "David A. Black" Date: 2004-09-23T04:44:42+09:00 Subject: Re: not greedy enough Hi -- On Thu, 23 Sep 2004, Hal Fulton wrote: > David A. Black wrote: > > I think what you want is: match one or more consecutive occurrences > > of -\n, stopping when one of them has an extra \n at the > > end. > > > > Try this and see if it's close to what you need: > > > > /(^\ *-.*\n)+\n/ > > Umm... in the regexp as in the other, isn't an m needed at the end? No, because if you put an /m, then the dot will match \n, and .* will trample over the end of the lines. I'm using \n as a flag for starting and stopping. David -- David A. Black dblack@wobblini.net