Wednesday, July 28, 2010

Re: Replace except enclosed by delimiters (")

Hi Tim!

On Mi, 28 Jul 2010, Tim Chase wrote:

>> As an example give the input text
>>
>> FOO, FOO, fooO, "foOO"
>>
>> I want it to become
>>
>> foo, foo, fooo, "foOO"
>
> If you're just getting started with Vim, this is a rather tricky
> problem. However, you've come to the right mailing list. :)
>
> You can use the following:
>
> :%s/\%(^\%([^"]\+\|"[^"]*"\)*\)\@<=[^"]\+/\L&/g

Nice. I tried, but didn't find a solution. However, this solution is
really slow, when I tried it on a buffer with only the sample data.

So I hope, this does not need to be applied to a large file.


regards,
Christian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: