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.
the patter seems the opposite of what they listed
\S = space
\s = not a space
give pattern XXxXXxXX
"\s\s\S\s\s\S\s\s" or "(\s{2}\S{1}\s{2}\S{1}\s{2})"
but solution is :
"\S\S\s\S\S\s\S\S" or "(\S{2}\s\S{2}\s\S{2})"
so why so this seem backwards from the givent pattern?
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 →
the patter seems the opposite of what they listed \S = space \s = not a space
give pattern XXxXXxXX "\s\s\S\s\s\S\s\s" or "(\s{2}\S{1}\s{2}\S{1}\s{2})" but solution is : "\S\S\s\S\S\s\S\S" or "(\S{2}\s\S{2}\s\S{2})" so why so this seem backwards from the givent pattern?