Break up long string with dashes

by kshep92

JavaScript

(function() {
  //Break up long passpoint card numbers with dashes for cashier readability.
  document.write("k1267p5hsgd".match(/[a-z0-9]{1,4}/ig).join("-"));
})();