Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Regular Expression problem

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
shogun1234
Posts: 156
Joined: 2006-07-13 08:04
Has thanked: 3 times

Regular Expression problem

#1 Post by shogun1234 »

I have a string which looks like

Code: Select all

LIST(NAME(john,123),NAME(brown, 456),...)
In vim I want to wrap personal names with double quotes. So the string would become

Code: Select all

LIST(NAME("john", 123), NAME("brown", 456), ...)
The RE I attempt to match is

Code: Select all

:g/NAME\([:alpha:],\d\)/s//NAME\(\"\1\",\d\)/g



But I find I can't match personal names. What's the write way to match personal names with RE? Vim version is 8.1. Thanks

Post Reply