regex - double quoting the strings inside bracket -


I have a line like below.

fullname = (this is a test name);

I want to quote all the stars inside "(" and ")".

i.e. the full name = ("this" "one" "a" "" "" "");

Can anyone give me a Vime Reggae to do this?

It does this:

 :% s / \ v (\ (. *) @ & Lt; = [[: alnum:]] + (. * \)) @ = / "& Amp; / g  

Keep in mind that nested patterns In parentheses like matching) the wrong with regex will be wrong if the input is bad. The nested brackets above do not handle at all, and the quoted or saved brackets will also break it. Take care with care.

It reads as follows:

:% s Matching / mailing on all lines \ v ("very magic" (\ (. *) @ & Lt; = [[: alnum:]] after this opening row on the line [+] A series of alphanumeric characters (i.e. "word") (. * \) ) @ = This line changes with "and" match, in quotes / live globally 

It is a remarkable fact that Vim actually supports variable length back and forth most modern Reggae do not apply.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -