I'm trying to parse a tabbed text file which has on a single line multiple parts of data, the only way to differentiate between each part of data is that the parts are separated by gaps of two or more spaces or tabs.
I've found tons of answers on stack about replacing multiple spaces to a single space but haven't been able to get anything to answer my issue, I've tried playing around with the regex patterns to no avail.
DER V3,0,0,3323 Xkisjd 2014 02 25 05:23 PGM / RUN BY / DATE
I was using something like this but it doesn't affect the data I would suspect this is due to the data begin separated by a tab.
preg_split("/\s\s+/", $data, -1, PREG_SPLIT_NO_EMPTY);
I would appreciate any help I can get or suggestions.
Expected outcome would be an array:
PGM => DER V3,0,0,3323
RUN BY => Xkisjd
DATE => 2014 02 25 05:23