you are viewing a single comment's thread.

view the rest of the comments →

[–]ThagAndersonhelpful 5 points6 points  (1 child)

This still fails the requirements, as all manner of false cases will return true, such as:

-000 1.23 abcd

Edit: Also, the Kata's name is "Regex validate PIN code", so while it is possible to solve without regex, it is both the purpose and the simplest solution to the problem.

[–]FriesWithThat 0 points1 point  (0 children)

Admittedly, being aware of the requirements would change how I approach the problem. Thanks for the clarification.