To quote whatever is in the N+1 CSV column:

search:  ^\(\([^,]*,\)\{N\}\)\([^,]*\)\(,.*\)
replace: \1'\3'\4

Everything leading up to the stuff you want to quote goes in the first
group:
^\(\([^,]*,\)\{N\}\)

  Match N occurrences of anything followed by a comma.  Anything
followed by a comma is the second group.  This group is needed in order
to do the N occurrences.
  \([^,]*,\)\{N\}

Match anything that's not a comma and put it in the third group.
\([^,]*\)

Match a comma followed by everything else, and put it in the fourth group.
\(,.*\)


Now replace with the first group, followed by the third group in single
quotes, followed by the fourth group.
\1'\3'\4


galen
-- 
Galen Seitz
[email protected]
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to