Notepad++ 6.8.8 I want to be able to turn several lines that start like this:
0,2,3,45,67,89,01,234,567,890,123,4567,8901
0,7,8,9,0,11,12,13,14,151,162,173,184
x,z,q,r,n,f,t,a,e,f,z,n,a
into
0, 2,3, 45,67, 89,01, 234,567, 890,123, 4567,8901
0, 7,8, 9,0, 11,12, 13,14, 151,162, 173,184
x, z,q, r,n, f,t, a,e, f,z, n,a
A space after the initial 0,
comma, (first number with comma afterwards) and then every 2 commas, put one blank space after the comma.
- Not every line will start with
0
[zero]. Can start with any digit or period.
possibly words sometimes. - I want each line to be treated independently; maintain their separate line content (one line cannot wrap into another when searching for numbers and commas).
I may have another situation where I will need to add space after comma into groups of 4 after the first comma. example:
x,z,q,r,n,f,t,a,e,f,z,n,a
to
x, z,q,r,n, f,t,a,e, f,z,n,a
Notepad++ is the preferred way to do this (regular expressions, macro, etc), but I do have EmEditor, MS Word / Excel 2010 if this helps. It is difficult to record a macro like this, because the amount of characters before/after each comma can be different. Please also explain the syntax that you use in case adjustments need to be made.