[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: find and replace at once ...
From:       Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date:       2010-04-30 22:18:56
Message-ID: hrfl0g$mp8$1 () dough ! gmane ! org
[Download RAW message or body]

Milian Wolff wrote:
> Albretch Mueller, 30.04.2010:
>>   Hi,
>> ~
>>   I have a number of character strings which I would like to convert to
>> some accented letters
>> ~
>>   Say you would like to convert at once: a' e' i' respectively to: á é í
>> ~
>>   How can you do this with a regexp that the kate editor can process?
>> ~
>
> You cannot.

In one pass, no. Individually, should be no problem (you don't even need 
to use a regular expression).

TBH, this almost sounds like a job for sed:
$ sed 's/a'/á/g;s/e'/é/g;s/i'/í/g' # ...etc.

Now, an interesting question is, if you wrote a regex to convert 
"[aei]'" to the Unicode compose character plus the original string, 
would *that* work? (Presumably you could then use iconv to convert the 
composed sequences to whatever representation you prefer.)

-- 
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
-- 
ENLS: translation failed (Google was not your friend this time)

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic