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.
It's more so that it's matching the last instance of the thing you are looking for. Because, for instance, it won't match x if there is another x later on in the string, regardless of the characters in between. That's what (?!.*\1) is doing here - it's making sure that a match is not made when there is another x later on. In the context of this kata, then you can see it's actually helping us find only the last instance of each unique alphabet character.
This is very powerful with the use of all of these functions. Glad to see this answer, as mine was much worse lol
This comment is hidden because it contains spoiler information about the solution