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.
If you go and learn how to use regex, then you will know how to solve this kata without looking up a specific solution to it.
I see what you mean, but I think there's a specific nuance with this type of task. There's a difference between learning a general tool (like what Regex is) and looking up the exact syntax to check if a string only contains alphanumeric characters. For this specific problem, looking up how to do that feels like looking up the riddle's punchline. If I don't know the trick beforehand, looking it up feels less like learning a concept and more like cheating to get the answer.
Without Discord, the idea is still the same: you ask some other community, or AI, or google, or here in kata discussion, not about solution but about a concept. Instead of asking "how do I solve this kata?" you ask "what do I need to know to solve this kata?" and follow from there.
This is not exactly true, and reveals a gap in reasoning. If you don't know the concept, you can ask for help with the concept, and learn the concept. Just talk to someone: to other users, to google, to AI. Do not ask about solution, but ask about ideas. The fact that you have to know or figure out everything alone is a huge, but for some reason quite prevalent, misconception.
I don't have access to Discord unfortunately but I was just asking generally because it is a problem with many kata where if you don't know the concept you can't do the kata without looking up the solution itself.
You can, for example, visit Codewars Discord and ask for ideas and suggestions how to approach this kata.
How would you do this without knowing regex and how would you learn regex to do this without cheating by looking up the solution? Or would it not be considered cheating?
Regex is a cool thing tho, so thanks for teaching me somethign new!
Yeah I wish I could just delete my comment, sorry
Very good Kata. REGEX is so powerful, even researching how to do this taught me more about REGEX which can look intimidating at first.
learned something new, thanks
This comment is hidden because it contains spoiler information about the solution
Merged
Putative fix for Python
The entire point is that it's a regex task though?
this particular cheese no longer passes the new tests as I upgraded to RSpec assertions (
expect(str).to match(regexp)).it throws a type error:
wrong argument type ... (expected Regexp)Loading more items...