I have a variable like so:
output = "KORD 142327Z 1500/1606 31012KT P6SM FEW060 SCT300 FM150200 04007KT >P6SM FEW300 FM150400 01005KT P6SM SKC FM151400 22008KT P6SM SCT250 FM151900 >22014G23KT P6SM BKN250 FM160200 23014KT P6SM SCT150 BKN250 WS010/25040"
I want to insert a newline before every "FM" character sequence so I can print it to user and its easier to read.
Currently my code is as follows, but replaces the first "FM" sequence with a "\n" then stops without continuing onto the next "FM" set.
output [/(FM{1})/, 0] = "\n"
I don't want to replace FM with newline. I need to append "\n" immediately before each "FM" character set. Any help with this would be appreciated.