Skip to content

Instantly share code, notes, and snippets.

@edfuh
Created October 19, 2011 21:23
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 edfuh/1299726 to your computer and use it in GitHub Desktop.
Save edfuh/1299726 to your computer and use it in GitHub Desktop.
Turn any string into a start up band name
// 'toaster'.toStartUpBand();
String.prototype.toStartUpBand = function () {
return this.replace(/[^aeiuo]([aeiuo]{1})[^aeiuo]+$/g, function(m,m1){return m.replace(m1, '')}) + 'ly';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment