Introduction

Matching Specific String

You have a test string S. Your task is to match the string hackerrank. This is case sensitive.


Matching Anything But a Newline

You have a test string S. Your task is to write a regular expression that matches only and exactly strings of form: abc.def.ghi.jkx, where each variable a,b,c,d,e,f,g,h,i,j,k,x can be any single character except the newline.


Matching Digits & Non-Digit Characters

You have a test string S. Your task is to match the pattern xxXxxXxxxx .Here x denotes a digit character, and X denotes a non-digit character.


Matching Whitespace & Non-Whitespace Characters

You have a test string S. Your task is to match the pattern XXxXXxXX. Here, x denotes whitespace characters, and X denotes non-white space characters.


Matching Word & Non-Word Character

You have a test string S. Your task is to match the pattern xxxXxxxxxxxxxxXxxx. Here x denotes any word character and X denotes any non-word character.


Matching Start & End

You have a test string S. Your task is to match the pattern Xxxxx. Here, x denotes a word character, and X denotes a digit. S must start with a digit X and end with . symbol. S should be 6 characters long only.

Last updated

Was this helpful?