I have a text file with 15000 rows (See sample below)
How can I insert 2 lines after every 5th instance of the word "ENTER"
I need to insert the a new line with the word "ENTER" and a second line with the string "DELAY 35000"
Thanks
DELAY 5000
CODE: 1234
ENTER
DELAY 500
CODE: 0000
ENTER
DELAY 500
CODE: 1111
ENTER
DELAY 500
CODE: 2580
ENTER
DELAY 500
CODE: 1212
ENTER
DELAY 500
CODE: 5555
ENTER
DELAY 500
CODE: 2222
ENTER
DELAY 5000
CODE: 1234
ENTER
DELAY 500
CODE: 0000
ENTER
DELAY 500
CODE: 1111
ENTER
DELAY 500
CODE: 2580
ENTER
DELAY 500
CODE: 1212
ENTER
DELAY 500
CODE: 5555
ENTER
DELAY 500
CODE: 2222
ENTER
Note: [\s\S] matches any character that is white space or is not white space, that is, any character at all, including a newline (which . does not match).