I'm using the Regex enabled Search&Replace function in EditpadLite. My document looks like this
20-10-2011;foo1;foo2;foo3;foo4;foo5
19-10-2011;foo1;foo2;foo3;foo4;
18-10-2011;foo1;foo2;foo3;foo4
17-10-2011;foo1;foo2;foo3;foo4;foo5
16-10-2011;foo1;foo2;foo3;foo4;
15-10-2011;foo1;foo2;foo3;foo4
The problem; each line should contain 4 ; symbols, so line 3 and 6 require an additional semicolon at the end of the line, by replacing \n with ;\n. I've tried:
(?<!^.*;{3}.*$)\n
to select the end of line characters not preceded by a line containing exactly 3 semicolons. This doesn't work however, because, I think, the semicolons are not consecutive. Is there an alternative for this?
should match only line 3 and 6
just replace match with
$1;