From sentto-2489639-88-978197119-guckes=math.fu-berlin.de@returns.onelist.com Sat Dec 30 17:25:28 2000 Return-Path: Delivered-To: guckes@math.fu-berlin.de Received: (qmail 4492 invoked from network); 30 Dec 2000 18:25:27 +0100 Received: from ei.egroups.com (64.211.240.237) by leibniz.math.fu-berlin.de with SMTP; 30 Dec 2000 18:25:27 +0100 X-eGroups-Return: sentto-2489639-88-978197119-guckes=math.fu-berlin.de@returns.onelist.com Received: from [10.1.4.56] by ei.egroups.com with NNFMP; 30 Dec 2000 17:25:25 -0000 X-Sender: pemente@northpark.edu X-Apparently-To: sed-users@egroups.com Received: (EGP: mail-6_3_1_3); 30 Dec 2000 17:25:18 -0000 Received: (qmail 49372 invoked from network); 30 Dec 2000 17:25:17 -0000 Received: from unknown (10.1.10.26) by l10.egroups.com with QMQP; 30 Dec 2000 17:25:17 -0000 Received: from unknown (HELO spock.northpark.edu) (206.68.42.2) by mta1 with SMTP; 30 Dec 2000 17:25:17 -0000 Received: from pemente.northpark.edu (npu-242-64.northpark.edu [206.68.242.64]) by spock.northpark.edu with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id Z2Q0PVZA; Sat, 30 Dec 2000 11:23:55 -0600 To: sed-users@egroups.com Message-ID: <3A4DC686.32376.381DD6@localhost> Priority: normal X-mailer: Pegasus Mail for Win32 (v3.12c) From: "Eric Pement" MIME-Version: 1.0 Mailing-List: list sed-users@egroups.com; contact sed-users-owner@egroups.com Delivered-To: mailing list sed-users@egroups.com Precedence: bulk List-Unsubscribe: Date: Sat, 30 Dec 2000 11:27:02 -0600 Subject: sed wish list, revisited Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: RO Content-Length: 1541 Lines: 51 What would I like to see in the next version of sed? s/find/replace/ commands in the /replace/ portion: \l, \L Lower-case next char, lower-case rest of pattern \u, \U Upper-case next char, upper-case rest of pattern \E End case conversion invoked by previous "\[lLuU]" switches: -E, --extended-regex No more need to backquote (...groups...) or x{interval,expressions}. Also: +, ?, and | work without backslashes, just like Perl. minimal matching (requires -E switch): *? 0 or more, but as few as possible +? 1 or more, but as few as possible ?? 0 or 1, but 0 if possible {m,n}? between m and n, but as few as possible Here's an illustration of how minimal matching works: [1] d:\sed>>echo banana | sed "s/b.*an/TOAST/" TOASTa [1] d:\sed>>echo banana | perl -pe "s/b.*?an/TOAST/" TOASTana I know this would be a "step up" for the folks who have to maintain sed, but this would be great blessing to many people, I think, for sed to encompass some of these features. Happy holidays to all! Kind regards, Eric Pement -- Eric Pement - pemente@northpark.edu 5139 N. Christiana, Apt. 2, Chicago, IL 60625 Phone: (773) 539-7479 -------------------------- eGroups Sponsor -------------------------~-~> Big News - eGroups is becoming Yahoo! Groups Click here for more details: http://click.egroups.com/1/10801/0/_/_/_/978197119/ ---------------------------------------------------------------------_->