Created
December 30, 2013 18:23
-
-
Save hisui/8185749 to your computer and use it in GitHub Desktop.
Splits a camel-cased name to word segments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "ThisIsAUniqueID".scan(/(?:[A-Z][^\WA-Z]+|[A-Z]+(?![^\WA-Z]))/) | |
| # ==> ["This", "Is", "A", "Unique", "ID"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment