Date: Wed, 9 Sep 2009 12:54:51 -0400 From: Bob Hall <rjhjr0@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: Regex Help - Greedy vs. Non-Greedy Message-ID: <20090909165450.GA1610@stainmore> In-Reply-To: <4AA7D49D.8090002@mykitchentable.net> References: <4AA7D49D.8090002@mykitchentable.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 09, 2009 at 09:15:25AM -0700, Drew Tomlinson wrote: > I'm trying to do a search and replace in vim. I have lines like this: > http://site1/dir/; > http://site2/dir/;LastName, FirstName;Phone; > http://site3/dir/;LastName, FirstName; > http://site4/dir/; > > I'm want to match "http:*" and stop matching at the first ";". My basic > regex is: > > /http:.\+;/ Use "{-}" in place of "+". /http:.\{-};/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090909165450.GA1610>