From owner-freebsd-questions@FreeBSD.ORG Tue Sep 28 17:41:04 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF78D16A4CE for ; Tue, 28 Sep 2004 17:41:04 +0000 (GMT) Received: from sage.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1936743D31 for ; Tue, 28 Sep 2004 17:41:04 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from thought.org (tao [10.0.0.247]) by sage.thought.org (8.12.10/8.12.10) with ESMTP id i8SHeZh0016482; Tue, 28 Sep 2004 10:40:36 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by thought.org (8.12.11/8.12.11) with ESMTP id i8SHewh3002628; Tue, 28 Sep 2004 10:40:58 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.12.11/8.12.11/Submit) id i8SHevaK002627; Tue, 28 Sep 2004 10:40:57 -0700 (PDT) (envelope-from kline) Date: Tue, 28 Sep 2004 10:40:57 -0700 From: Gary Kline To: Atle Veka Message-ID: <20040928174057.GB2525@thought.org> References: <20040927235915.082C416A4E5@hub.freebsd.org> <20040927171855.J72052@fincher.users.accretive-networks.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040927171855.J72052@fincher.users.accretive-networks.net> X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing 18 years of service to the Unix community User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org Subject: Re: regex replacement wizard advice needed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2004 17:41:04 -0000 On Mon, Sep 27, 2004 at 05:23:03PM -0700, Atle Veka wrote: > > How about something like (assuming space between numbering and paragraph > is a tab): > > perl -pi -e 's,^(\d)\t,$1
,' > > > Atle Right. I could've come up with something like this without digging out my REGEX book. But Tom Embt's example was right on the money. (FWIW, I've learned to never try to explain to non-nerds what a regular expression is. They give me strange looks!) thanks, gary -- Gary Kline kline@thought.org www.thought.org Public service Unix