oktw says to #ysitd
<mmis1000>: function extractFlags (text) { var temp = text.match(/^((?:--?[a-z]+(?:=[^\s]*)?\s+)*)(.*)$/i) var newText = temp[2].replace(/^--\s/, ''); var flags = {}; var temp2 = temp[1].match(/--?[a-z]+(?:=[^\s]*)?/ig) if (temp2) { temp2.forEach(function (flag) { var value = true; var hasValue = null; hasValue = !! flag.match(/^--?[a-z]+=/i); if (hasValue) { value =