Hello. I ask for the help of the implementation of the removal function, in a text file, of the newline character in the lines that begin with "nazwa =" and "khnazwa =".
Example:
nazwa = Any
text
location = any
It should look like this:
nazwa = Any text
location = any
Example 2:
khnazwa = Any
text
khadres = any
It should look like this:
khnazwa = Any text
khadres = any
The original part of the document (as you can see, the line "nazwa =" is divided into two lines, and after passing the program it should be one line):
Kontrahent{ Notatka_Dl{ opis = } id =65 flag =0 subtyp =0 znacznik =68 info =N osoba = kod =Cerrad nazwa = Spolka z Ograniczona Odpowiedzialnoscia miejscowosc =Starachowice dom = lokal = imie = bnazwa = bkonto = negoc =N grupacen =5 typ_naliczania =netto typ_ceny =B upust =0 limit =0 limitkwota =0.00 limitwaluta = rejestr_platnosci =BANK forma_platnosci =przelew 14 dni stanpl =0.00 stannl =0.00 zapas = NazwaRodzaju =Kontrahenci? } I see this process logic. We are looking for a line that begins with "nazwa =" and check the beginning of the next one, if it contains "location =" go further, and if not, delete the line break in the line with "nazwa =" and go further.
Also in the line that starts with "khnazwa =" we check the beginning of the next one, if it contains "khadres =" we go further, and if not, delete the newline character in the line with "khnazwa =" and go further.
Thanks to all who made efforts to solve the problem.
знак переноса? - splash58