This would be so much easier if the system making the text file used
json_encode, and decrypted it with
json_decode
json_encoded arrays look very similar to the text you want parsed, if you cannot change the initial text file and how it's generated....follow JAndertons advice