Add double quotes around words, add comms between words
Posted: Mon Dec 20, 2010 1:00 am
Hi,
I'm wanting to write a macro to add double quotes around words, and add commas between words. In actuality, it's just a regular expression search and replace. The purpose is to build an "IN ( )" expression in SQL.
Say I have this text:
What I want to do is select the first two lines, then generate this desired text:
Note the collapsing of extra space in the 2nd line.
All help greatly appreciated, and a free beer to you the next time you're in Sydney.
Thanks,
Scott
I'm wanting to write a macro to add double quotes around words, and add commas between words. In actuality, it's just a regular expression search and replace. The purpose is to build an "IN ( )" expression in SQL.
Say I have this text:
Code: Select all
AAA BBB CCC
DDD EEE FFF
GGG HHH III
Code: Select all
"AAA","BBB","CCC",
"DDD","EEE","FFF"
GGG HHH III
All help greatly appreciated, and a free beer to you the next time you're in Sydney.
Thanks,
Scott