Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The regex picks any character followed by an uppercase letter and sets two groups
\1 = [any character]
\2 = [the uppercase letter that follows]
Then it replaces this pattern by the format "\1_\2"
So, for the string 'CodeWarsPascalCase' it will pick 'eW', 'rP' and 'lC' and replace with the new given pattern ('e_W', 'r_P' and 'l_C')
Pretty clever, indeed.