How can I split a string on whitespaces or quotes if they’re present
Context: I have a list of keywords that sometimes consist of one word (e.g. poisson, normal, …) and sometimes consist of two words, which are then within single quotes (‘Two-way ANOVA’, ‘Generalized linear model’, …). All keywords are separated by white spaces in a single string.