[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: search and replace to upper/lower case
From: |
carlo |
Subject: |
Re: search and replace to upper/lower case |
Date: |
Thu, 15 Oct 2020 16:35:12 +0200 |
User-agent: |
K-9 Mail for Android |
thank you so much, benno
carlo
「 please excuse my brevity 」
On October 15, 2020 4:15:05 PM CEST, Benno Schulenberg <bensberg@telfort.nl>
wrote:
:
:Hello Carlo,
:
:Op 15-10-2020 om 15:07 schreef carlo:
:> i can't get regex search and replace to change text case from lower
:to upper
:>
:> \U and \L won't work with something like \U\1 in the replace-with
:string -- i
:> may be failing the syntax
:
:When you read 'info sed sed the', you will see than \L and \U are GNU
:sed
:extensions. Other tools (and nano) do not know these backslash
:escapes.
:
:> i can do it by ^T and using sed as external command, but i have to
:enter the
:> text string myself, like:
:>
:> sed 's/^.*$/\U&/' <<< "uppercase me"
:
:You can make a string bind in your .nanorc, for example:
:
: bind Sh-M-U "^T|sed 's/^.*$/\U&/'^M" main
:
:(where ^T and ^M are literal control characters, entered with M-V).
:
:Restart nano, select the text you want to upcase, and hit Shift+Alt+U.
:
:[Please answer to the list, not to me.]
:
:Benno