Showing posts with label Introduction. Show all posts
Showing posts with label Introduction. Show all posts

Saturday, October 29, 2016

Matching Start & End - Hacker Rank Solutions

The ^ symbol matches the position at the start of a string.

The $ symbol matches the position at the end of a string.

Task
You have a test string . Your task is to match the pattern 
Here,  denotes a word character, and

Matching Word & Non Word Character - Hacker Rank Solutions

The expression \w will match any word character. 
Word characters include alphanumeric characters (-- and -) and underscores (_).

Matching Whitespace & Non-Whitespace Character - Hacker Rank Solutions

\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.
Powered by Blogger.