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.
This was a fun one. I tried my best on this one to create a solution that doesn't use Array functions like map, reduce, split and join since I've been relying on those quite a bit in many of my solutions to other katas. I was able to get this one worked out by relying almost exclusively on the power of regex and less on Arrays.
Hmm, looking through some of these solutions I think most of them would do the same if passed an empty string or a string made up completely of invalid characters.