splitting by white space or multiple white spaces 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(/ +/);