I'm looking for a way to split a string in JavaScript dynamically and keep the contents after so many occurrences of a particular character. I've tried searching all over for something to solve this, though not had any success. Here's an example of the format I'll be using:
var s = "17:44, 22 July 2015 Foo connected to chat from address 127.0.0.1";
In the above example, I want the rest of the contents of the line after 2015, though at the same time I don't want to use 2015 or any of the start of the string as a hardcoded way to split because users can call themselves that, which would mess up the way of splitting, as well as I sometimes have to go back years too.
In a nutshell I want to split the string after the 4th space dynamically, and keep whatever is after without splitting the rest too.