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.
Matching Whitespace & Non-Whitespace Character
Matching Whitespace & Non-Whitespace Character
Sort by
recency
|
120 Discussions
|
Please Login in order to post a comment
I need some help related yo my website https://yowsap.com/
It appears to me that this issue lacks clear definition. The initial pattern suggests there should be three pairs of non-space characters, with a single space separating each pair. However, the test cases present inconsistencies. Some have multiple spaces between pairs, while others contain more than two consecutive non-space characters. This makes it difficult to predict which test cases will validate the code and which will not, as different cases seem to support different implementations[.](click here)
It appears to me that this issue lacks clear definition. The initial pattern suggests there should be three pairs of non-space characters, with a single space separating each pair. However, the test cases present inconsistencies. Some have multiple spaces between pairs, while others contain more than two consecutive non-space characters. This makes it difficult to predict which test cases will validate the code and which will not, as different cases seem to support different implementations.
They included test cases that didn't match the description of the problem.
The only pattern to pass all test cases is
/^\S{2,3}\s\S{2}\s\S{2,3}$/
The answer to the problem the way it was described is
/(\S{2}\s?){3}/