Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 May 2000 14:34:52 +0100 (BST)
From:      Jan Grant <Jan.Grant@bristol.ac.uk>
To:        Dan Larsson <dl@tyfon.net>
Cc:        questions <questions@freebsd.org>
Subject:   Re: matching all non [:lower:]
Message-ID:  <Pine.GHP.4.21.0005101433590.487-100000@mail.ilrt.bris.ac.uk>
In-Reply-To: <NEBBJANJCNNAKCPFKHHFKEOFCBAA.dl@tyfon.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GHP.4.21.0005101433590.487-100000>