Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

    if you don't know the concept you can't do the kata without looking up the solution itself

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    You can, for example, visit Codewars Discord and ask for ideas and suggestions how to approach this kata.

  • Custom User Avatar

    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!

  • Custom User Avatar

    Yeah I wish I could just delete my comment, sorry

  • Custom User Avatar

    Very good Kata. REGEX is so powerful, even researching how to do this taught me more about REGEX which can look intimidating at first.

  • Custom User Avatar

    learned something new, thanks

  • Custom User Avatar
    • please do not raise issues to ask for help, ask questions instead
    • see this for how to post code. currently, your regex is garbled by the formatting since special characters are interepreted as Markdown code
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    The entire point is that it's a regex task though?

  • Custom User Avatar

    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...