help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: case change in replacement text with regex-replace


From: Le TeXnicien de Surface
Subject: Re: case change in replacement text with regex-replace
Date: Sun, 15 Apr 2007 10:22:18 +0200
User-agent: KNode/0.10.1

Dieter Wilhelm écrivait :

> Le TeXnicien de Surface <texnicien.de.surface@chezmoi.eur> writes:
> 
>> I capture text with the following regexp "\([^"]*\)"
>> and I would like the following:
>> if AB is the captured text, the replacement text is: AB ab Ab aB.
> 
> I do not understand, your regexp catches all chars (including
> newlines) except `"' and your example has only two chars?
First of all, many thanks for the answer.
It seems that I was anything but clear so I will try to restate my question:
I know I will obtain a string of two characters (the capturing regexp is in
fact immaterial) and what I would like to obtain from, say, AB is the
string `AB ab Ab aB' as previously stated. I could even easily capture two
strings of one character each. So, in a nutshell: How do we change the case
of a character, previously captured, in the replacement string? Is there
anything as the perl \U to be used in the replacement part of a
regex-search and replace?

Many thanks in advance for any hint
-- 
Le TeXnicien de Surface


reply via email to

[Prev in Thread] Current Thread [Next in Thread]