Forum Discussion
Hans_Olsson
Jun 21, 2023Copper Contributor
Replace parts of text that meets certain criteria in a text file
I have a text file with approx 58000 lines. The lines holds different types of content for different purposes. Some numbers that meets certain criterias should change to always have a fixed number o...
- Jun 22, 2023
Hi Hans_Olsson
Thanks for the pictures. According to the few examples you posted earlier #OBJEKT strings appear to be formatted as below but with copy/paste on the Web we're never sure so please check this first with your actual data
The attached update highly/only relies on those consistent patterns (seems very consistent on your side according to your pictures :))
#OBJEKT<2 spaces>6<2 spaces>"2003"<1 space>"Kastrup 11.1"
#OBJEKT<2 spaces>25<1 space>"001"<1 space>"ŽTA 001"
Lorenzo
Jun 21, 2023Silver Contributor
Please re-download attachment from the previous reply. Query updated to not replace records like below if they exist:
#TRANS 4324 {"6" "4002-22" "28" "03"} 22625.00 20220207 "Entreprenad AB"
In previous version such records were updated as if the 28 = 25