Forum Discussion
Replace parts of text that meets certain criteria in a text file
- 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"
The #OBJEKT 6 and #OBJEKT 25 strings do not have any {}. No.
Picture from current worksheet section with #OBJEKT 6 (In obj)
As an example Lines 468 and 469 should modify to (Out obj):
| #OBJEKT 6 "00004023" "Iljansbodaskolan" |
| #OBJEKT 6 "49012023" "Service 2023" |
Picture from current worksheet section with #OBJEKT 25 (In obj)
As an example Line 579 should modify to (Out obj):
| #OBJEKT 25 "0048" "ŽTA 0048" |
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"
- LorenzoJun 22, 2023Silver Contributor
Glad this worked 1st time & thanks for the feedback
(re. commitment IMHO smart people deserve I do/try my best)
Enjoy your long week-end in Sweden...
All the best
- Hans_OlssonJun 22, 2023Copper Contributor
Lorenzo Heureka. You did it. You are the hero!!!
I'm deeply impressed by your skills and your commitment. One of a kind.
Tomorrow it's Midsummer in Sweden where I'm from. Now I can sit back, relax and enjoy the festivities. Big thanks to you!
Again, big thanks and all the best,
Hans