From owner-freebsd-questions@FreeBSD.ORG Sun Dec 5 00:26:09 2010 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 C47FA1065673 for ; Sun, 5 Dec 2010 00:26:09 +0000 (UTC) (envelope-from kline@thought.org) Received: from thought.org (plato.thought.org [209.180.213.209]) by mx1.freebsd.org (Postfix) with ESMTP id 9F9A68FC24 for ; Sun, 5 Dec 2010 00:26:09 +0000 (UTC) Received: by thought.org (Postfix, from userid 1001) id 943A7E80AA3; Sat, 4 Dec 2010 16:26:08 -0800 (PST) Date: Sat, 4 Dec 2010 16:26:08 -0800 From: Gary Kline To: FreeBSD Mailing List Message-ID: <20101205002602.GA27499@thought.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 24 years of service to the Unix community. User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: regex question.... 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: Sun, 05 Dec 2010 00:26:09 -0000 Gang, I was tried to find Jeffrey Friedl's email to figure out some quick regex when it struck me that the list can clue me in.... [[I have figured this out myself several times--well, 3 or 4 anyway--but it was more trial/error than I need.]] I have a file with ints from 0 to some N. What is the regex for vi or vim to use that will catch them all in one substititon command? I have tried :1,$/s/[0-9]][0-9][0-9]/foo/g or things very close to that. Zip. I could have sworn that I noted it dow n somewhere; cannot find. tia. -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix Journey Toward the Dawn, E-Book: http://www.thought.org The 7.97a release of Jottings: http://jottings.thought.org