From owner-freebsd-questions Wed May 10 6:35: 0 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by hub.freebsd.org (Postfix) with ESMTP id DFB9A37B767 for ; Wed, 10 May 2000 06:34:56 -0700 (PDT) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Wed, 10 May 2000 14:34:53 +0100 Received: from localhost (cmjg@localhost) by mail.ilrt.bris.ac.uk (8.8.7/8.8.8) with ESMTP id OAA26088; Wed, 10 May 2000 14:34:52 +0100 (BST) Date: Wed, 10 May 2000 14:34:52 +0100 (BST) From: Jan Grant To: Dan Larsson Cc: questions Subject: Re: matching all non [:lower:] In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 10 May 2000, Dan Larsson wrote: > How do I match all non lower characters > from a string? Evidently the caret (^) sign > doesn't work: > echo "#$%&a/()b=?" | sed -e '/[^[:lower:]]*/s///' > > (returns: a/()b=?) > (what I want it to return is: ab) tr -c -d \[:lower:\] -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287163 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk On modesty: whoever said "it's hard being perfect" obviously wasn't me. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message