Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created February 6, 2012 05:49
Show Gist options
  • Save isaacs/1749990 to your computer and use it in GitHub Desktop.
Save isaacs/1749990 to your computer and use it in GitHub Desktop.
var table=
["a:b:c:d:e"
,"x:y:z:d:w"
,"1:2:3:4:5"].join("\n")
table.replace(/:([^:]+)$/mg, function (_0, _1) {
console.error(_1)
})
var lasts = table.split("\n").map(function (line) {
return line.match(/[^:]*$/)[0]
})
console.error(lasts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment