Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created October 4, 2009 21:53
Show Gist options
  • Select an option

  • Save tmcw/201656 to your computer and use it in GitHub Desktop.

Select an option

Save tmcw/201656 to your computer and use it in GitHub Desktop.
# python code for soft-hyphenation of CamelCase text
hyphenated = re.sub('([a-z])([A-Z])', r'\1­\2', text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment