A solution :
var str = 'get "something" from "any site"';
var tokens = [].concat.apply([], str.split('"').map(function(v,i){
return i%2 ? v : v.split(' ')
})).filter(Boolean);
Result :
["get", "something", "from", "any site"]
It's probably possible to do simpler. The idea here is to split using "
and then split by the space the odd results of the first splitting.
If you want to keep the quotes, you may use
var tokens = [].concat.apply([], str.split('"').map(function(v,i){
return i%2 ? '"'+v+'"' : v.split(' ')
})).filter(Boolean);
Result :
['get', '"something"', 'from', '"any site"']
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…