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.
Yes, I think that's because the boilerplate code in the previous problem used re.match (which maps the pattern to the word exactly), but this uses re.search(which only checks is the pattern matches a substring of the word)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Matching Digits & Non-Digit Characters
You are viewing a single comment's thread. Return to all comments →
Yes, I think that's because the boilerplate code in the previous problem used re.match (which maps the pattern to the word exactly), but this uses re.search(which only checks is the pattern matches a substring of the word)