Saturday, October 29, 2016

Matching Digits & Non-Digit Characters - Hacker Rank Solutions

The expression \d matches any digit [ - ].


The expression \D matches any character that is not a digit.
Task
You have a test string . Your task is to match the pattern  
Here  denotes a digit character, and  denotes a non-digit character.
Note
This is a regex only challenge. You are not required to write any code. 
You only have to fill the regex pattern in the blank (_________).
------------------------------------------------------------------------------------------------

Matching Digits & Non-Digit Characters - Hacker Rank Solutions


The regex pattern used is:
Regex_Pattern = '\d\d\D\d\d\D\d\d\d\d'

No comments:

Post a Comment

Powered by Blogger.