JavaScript -String in Array von Comma und Space aufgeteilt

input.split(/[ ,]+/); //splits string using RegEx on a space OR a comma
Powerful Penguin