\s matches any whitespace character
[ \r\n\t\f ]
.
\S matches any non-white space character.
Task
You have a test string . Your task is to match the pattern
Here, denotes whitespace characters, and denotes non-white space characters.
Here, denotes whitespace characters, and denotes non-white space characters.
Note
This is a regex only challenge. You are not required to write code.
You have to fill the regex pattern in the blank (
You have to fill the regex pattern in the blank (
_________
).
---------------------------------------------------------------------------------------------------
Matching Whitespace & Non-Whitespace Character - Hacker Rank Solution
The regex pattern used is:
Regex_Pattern = '\S\S\s\S\S\s\S\S'
No comments:
Post a Comment