From owner-freebsd-questions@FreeBSD.ORG Wed Sep 9 17:00:36 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52CBB1065676 for ; Wed, 9 Sep 2009 17:00:36 +0000 (UTC) (envelope-from rjhjr0@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.221.175]) by mx1.freebsd.org (Postfix) with ESMTP id 0887B8FC1B for ; Wed, 9 Sep 2009 17:00:35 +0000 (UTC) Received: by qyk7 with SMTP id 7so41045qyk.9 for ; Wed, 09 Sep 2009 10:00:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=8yuSG+SEbtnHJRS1+mO9PJbIE9+VW8jTRDvSLTn1fOM=; b=vW3JEfjZNSNoi/fD0E0xdjtvSS7pAIgnF6M+VVe3Xp9f5g46TJb2CO1ZaAWN/SPvzL 5Y8wo7LIwuAQJuQTm6tAV1D6FzI72/7Pc3ImquEQRj0Y0sCyNQyn+zOozhe34pVcKpP0 EKoWHBLnB4rC56+0UEZktk25JYucqLXd6uWW0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; b=Rdyvlz1UZkC6zDk1F3w8BSVtnarkmQDC2j3YcaK9j9QjvGLbhqNgB7b2lmeDIMTdel ZFTwcOH6trNYxncEGEqjpFodmWbZ5tw3Y1x3FSM3ustnCCj1tYRgKCYDF39R6ZnTGkLV nel7u02GJCiZ47QWsTDYPhR2/SDyLkH7XXWtg= Received: by 10.224.94.78 with SMTP id y14mr407111qam.216.1252515292982; Wed, 09 Sep 2009 09:54:52 -0700 (PDT) Received: from localhost (ip98-163-115-74.dc.dc.cox.net [98.163.115.74]) by mx.google.com with ESMTPS id 6sm22038qwk.26.2009.09.09.09.54.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Sep 2009 09:54:52 -0700 (PDT) Date: Wed, 9 Sep 2009 12:54:51 -0400 From: Bob Hall To: freebsd-questions@freebsd.org Message-ID: <20090909165450.GA1610@stainmore> Mail-Followup-To: Bob Hall , freebsd-questions@freebsd.org References: <4AA7D49D.8090002@mykitchentable.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AA7D49D.8090002@mykitchentable.net> User-Agent: Mutt/1.4.2.3i Subject: Re: Regex Help - Greedy vs. Non-Greedy X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2009 17:00:36 -0000 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:.\{-};/