Skip to content

Instantly share code, notes, and snippets.

@captbaritone
Created November 17, 2012 03:29
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 captbaritone/4093058 to your computer and use it in GitHub Desktop.
Save captbaritone/4093058 to your computer and use it in GitHub Desktop.
Only the first and last letters
<?=preg_replace_callback("/(?<=[a-zA-Z])([a-zA-Z]+)(?=[a-zA-Z])/", create_function('$n', 'return str_shuffle($n[1]);'), $_POST['text'])?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment