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.
same solution)
It's regular expressions, they are not supposed to be readable. It's a great tool that you shouldn't avoid just because it doesn't look pretty.
Well thought regex. Simply loved it!
Removing the last
$
would leak matches such as255.255.255.255.123456789
.However, removing the second last
$
would still work.Agreed... definitely not best practices haha. As Voile said though it's a RegEx issue, not a JS issue.
Awesome! I think you can save one char; redundant
$
at the very end. Unless someone can find a case where it's needed?To be fair, it has nothing to do with JS but has to do with regexes. There's another kata of the same task (but in C#) and it's still the same kind of mess.
don't hate the player hate the game...
Best Practice? it is completely unreadable
may be it is the shortest one but show it to anyone non JSfluent to see if they understand it
Works great now. Thanks!
You don't! If you were having issues, please not that CodeWars seems to have made some changes. I revised the kata and it should work for you now.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
CodeWars seems to have made some changes. I revised the kata and it should work for you now.
Loading more items...