Back to top.
regex - Check if string is UUID
function isUUID (str) {
  var rgx = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
  return rgx.test(str)
}

gist

http://tmblr.co/Z4bAYxVX5-4i