Remove unwanted LF in large file
-
i have large text files that have unwanted line feeds in wrong spot, When i flip on view all I see LF only on the lines with unwanted line feed but i do see CRLF where i shoudl see a line feed. any idea how to fix this…
8698|FIXED_QTY_PRICE|IC US D11 HOLIDAY $5|PROMO $5|IC US D11 HOLIDAY $5 |0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0 8699|FIXED_QTY_PRICE|IC US D11 HOLIDAY $7|PROMO $7|IC US D11 HOLIDAY $7 |0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0 8700|FIXED_QTY_PRICE|IC US D11 HOLIDAY $10|PROMO $10|IC US D11 HOLIDAY $10 |0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0
this should only be 3 lines not 6 I have searched and seen some fixes but it replaced EVERY line feed instead of the LF with a missing CR… the above should really show as
8698|FIXED_QTY_PRICE|IC US D11 HOLIDAY $5|PROMO $5|IC US D11 HOLIDAY $5|0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0 8699|FIXED_QTY_PRICE|IC US D11 HOLIDAY $7|PROMO $7|IC US D11 HOLIDAY $7|0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0 8700|FIXED_QTY_PRICE|IC US D11 HOLIDAY $10|PROMO $10|IC US D11 HOLIDAY $10|0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0
-
@Joshua-Goodman
Go to the find/replace form.Check the
Regular expression
box in the bottom.Find what
:(?<!\r)\n
Replace with
: leave blank.This will remove all
LF
not preceded byCR
.