splitting on more than one space of white code example
Example 1: splitting by white space or multiple white spaces
$("#searchquery").text().split(/\s+/);
Example 2: splitting by white space or multiple white spaces
$("#searchquery").text().split(/ +/);