Hello, @david-cummings, @alan-kilborn and All,
Not difficult with regexes !
So, let’s start with this INPUT text :
406D69 NPT04S G-JMCH B734 West Atlantic UK -------- 25025 24450 1250 1250 30/01/2023 23:54:46 30/01/2023 23:59:31
Open the Replace dialog ( Ctrl + H )
SEARCH (?x-s) ^ (\S+) \x20 (\S+) \x20 (\S+) \x20 (\S+) \x20 (\S+) | \x20+ -------- .+
REPLACE (?1\1,\2,\3,\4,\5)
Untick all box options
Tick the Wrap around option
Select the Regular expression serach mode
Click on the Replace All button
=> You should get your expected OUTPUT text :
406D69,NPT04S,G-JMCH,B734,West Atlantic UK
If OK, I’ll explain you how it works, next time !
Note that I use the Free Spacing mode (?x), in the search regex, in order to separate the main parts for a better comprehension
Best Regards,
guy038