https://www.hackerrank.com/challenges/validating-postalcode
A valid postal code P have to fullfil both below requirements:
- P must be a number in the range from to inclusive.
- P must not contain more than one alternating repetitive digit pair.
Alternating repetitive digits are digits which repeat immediately after the next digit. In other words, an alternating repetitive digit pair is formed by two equal digits that have just a single digit between them.
Input Format
Locked stub code in the editor reads a single string denoting P from stdin and uses provided expression and your regular expressions to validate if P is a valid postal code.
Output Format
You are not responsible for printing anything to stdout. Locked stub code in the editor does that.
Sample Input 0
110000
Sample Output 0
False