code: function splitSpaceList(source) {
  	var segments = [];
  	var matcher = new RegExp("\"([^\"]*)\"|'([^']*)'|(\\S+)", "g");
  	var match;
  	while (match = matcher.exec(source)) {
  		if (match[1] != null) {
  			segments.push(match[1]);
  		} else if (match[2] != null) {
  			segments.push(match[2]);
  		} else {
  			segments.push(match[3]);
  		}
  	}
  	return segments;
  }
docs: Parses a list of strings delimited by whitespace, using optional double or single quote. TODO: handle escaped quotes within quoted segments? Does nginx allow spaces in the regex or replacement?