We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
My argument against that would be that we were asked to produce a pattern that will match strings containing XXxXXxXX -- with x being spaces, of course.
XXXXXX does not contain that pattern, so it should not match. Did you pass? Yes, but not in a way that meets the spirit of the question asked. Only because the test cases are not robust.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Matching Whitespace & Non-Whitespace Character
You are viewing a single comment's thread. Return to all comments →
I guess that's one way of looking at it.
My argument against that would be that we were asked to produce a pattern that will match strings containing XXxXXxXX -- with x being spaces, of course.
XXXXXX does not contain that pattern, so it should not match. Did you pass? Yes, but not in a way that meets the spirit of the question asked. Only because the test cases are not robust.