modify text file

I export text from file maker; manually amend it saving as ‘simple text format’ and then import into MYOB.
After quite a few years I messed up and its caused a few problems.

To avoid this ever happening again I need to make a script that searches through my text file and inserts a new blank line after each appearance of a particular repeating pattern 0 0 0 0 0 finally saving in the other format (it just does not import to MYOB if I don’t do this.
It is a task beyond me - can anyone offer advice, maybe it has been done already?

two text files online if you are interested
http://peachfarmlondon.com/text/

Hi and welcome,

something like this

property pattern : tab & "0" & tab & "0" & tab & "0" & tab & "0" & tab & "0"

set textFile to ((path to desktop as Unicode text) & "raw_export")
set theText to read file textFile
set {TID, text item delimiters} to {text item delimiters, pattern}
set theText to text items of theText
set text item delimiters to pattern & return
set theText to theText as text
set text item delimiters to TID
set ref_num to open for access file textFile with write permission
write theText to ref_num
close access ref_num