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

## Re: Capitalize letter after brace

 From: Andrea Vettorello Subject: Re: Capitalize letter after brace Date: Wed, 15 Oct 2008 07:28:16 +0200

```On Wed, Oct 15, 2008 at 7:02 AM, Ross A. Laird <address@hidden> wrote:
> This is the type of thing that would take me a day to figure out on my
> own (though, probably, I could eventually figure it out), but most
> readers of this group can probably throw me a line in a few seconds:
>
> I have some index entries in my tex file that are capitalized
> \index{Capitalized} and others that are not \index{not}. I want to make
> all entries consistently capitalized. This means a search for the first
> character after the opening index brace and a change of its case. What's
>

Not tested, probably needs some escaping (I'm not sure if the opening
brace should be escaped), anyway something like:

M-x replace-regexp Enter
Replace regexp: index{\(w\) Enter
with: index{\,(capitalize \1) Enter

The above should capitalize the first word after every "index{" in