Ad
  • Custom User Avatar

    How has this developed? Is is still an issue?

  • Custom User Avatar

    Sorry about that :)

    That's one of the tests for python in the 'Random Tests' section (I'd check but need to make sure I'm not making a mistake on my end and pass first before I can see the test cases)

  • Custom User Avatar

    Python's match() only returns true if the regex matches at the beginning of the string (this is, IMO, insane). The tests should be rewritten to use search() instead.

  • Custom User Avatar

    Yeah... I've had a look, but without knowing Python, it's a bit tricky guessing what the problem is. @jhoffner was the one that wrote it, so perhaps he can have a look..?

  • Custom User Avatar

    In the Python vrsion of the kata, your regex has to match the whole string. That must be a bug in the translation?

  • Custom User Avatar

    You don't have to match the whole string; you just have to make any kind of match. For the JavaScript version, Mod4.test(str) is used, so as long as some kind of match is made, you'll pass. Not sure about the other language versions (I didn't write them), but they should be the same.

  • Custom User Avatar

    Which language? I only wrote the original JavaScript version...

  • Custom User Avatar

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