Re: How to delete ANY characters in a string except [[:upper:]] ?
2008-07-01 15:19:49 GMT
On Sun, Jun 29, 2008 at 1:06 AM, Michelle Konzack
<linux4michelle <at> tamay-dogan.net> wrote:
> Hello Oleg,
>
> Am 2008-06-27 19:01:57, schrieb Oleg Verych:
>> >> I like to delete ANY characters in a string except [[:upper:]].
>> >
>> > Just use [^[:upper:]]
>> >
>> > sed 's/[^[:upper:]]//g'
>>
>> or (much) faster: `sed 's/[^[:upper:]]\{1,\}//g'`
>
> I do not understand this. Why is \{1,\} faster ?
it should be faster if you've got several consecutivenon upper
letters, tim's example will replace them one by one, oleg's example
should replace all consecutive non upper letters in one replacement.
--
For far too long, power has been concentrated in the hands of "root"
and his "wheel" oligarchy. We have instituted a dictatorship of the
users. All system administration functions will be handled by the
People's Committee for Democratically Organizing the System (PC-DOS).
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
RSS Feed