Skip to content

Instantly share code, notes, and snippets.

@dviramontes
Created June 14, 2013 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dviramontes/5782766 to your computer and use it in GitHub Desktop.
Save dviramontes/5782766 to your computer and use it in GitHub Desktop.
# emulates "nrmwyoldrmtob".scan(/.{1,5}/)
# encodes 5 char words and then some
class A
@replace = (str)->
str.match(/[a-z|0-9]{5}|[\w]+/ig).join(" ")
test= A.replace("nrmwyoldrmtob")
console.log(test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment