Skip to content

Instantly share code, notes, and snippets.

@imgen
Created May 4, 2020 06:13
Show Gist options
  • Save imgen/029b0303a356ff5826742d00921bd0d8 to your computer and use it in GitHub Desktop.
Save imgen/029b0303a356ff5826742d00921bd0d8 to your computer and use it in GitHub Desktop.
Split on camel case
// Taken from https://codereview.stackexchange.com/a/133709/209350
var words =
Regex.Matches("SmallFireBall", @"([A-Z][a-z]+)")
.Cast<Match>()
.Select(m => m.Value);
var withSpaces = string.Join(" ", words);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment