So if I have a string like:
'boss: "Person 1" AND occupation: "Engineer"'
Is there a way I can split the string into an array like such:
['boss:', '"Person 1"', 'AND', 'occupation:', '"Engineer"']
I have lots of different regex splits and multiple argument splits and I can't seem to achieve this. Any ideas?
FYI: yes I would like to leave in the quotations surrounding Person 1 and Engineer and maintain the spaces in whatever is between quotations
Thanks!