How may I write a function to get all the strings in quotes from a string? The string may contain escaped quotes. I've tried regex but as regex does not have a state like feature, I wasn't able to do that. Example:
apple banana "pear" strawberries "\"tomato\"" "i am running out of fruit\" names here"
should return an array like ['pear', '"tomato"', 'i am running out of fruit" names here']
Maybe something with split can work, though I can't figure out how.