-
Practice>Python>Regex and Parsing>Validating Postal Codeshackerrank.com 2019. 4. 30. 12:56728x90
Validating Postal Codes
Problem Link : https://www.hackerrank.com/challenges/validating-postalcode/problem
Difficulty : Hard
Tip
- 100000~999999
- [1-9]{1}[0-9]{5}$ <- don't forget '$'
- Lookahead is key
- (?=(\d)\d\1)
- Find one digit by using lookahead
- Find one more repeat which is captured previously
Solution
728x90'hackerrank.com' 카테고리의 다른 글
Hackerrank.com Practice>Java>Advanced>Java Singleton Pattern (0) 2019.12.02 Practice>Python>Built-Ins>Athlete Sort (0) 2019.05.01 Practice>Python>Regex and Parsing>Matrix Script (0) 2019.04.29 Practice>Python>Built-Ins>ginortS (0) 2019.04.29 Practice>Python>Regex and Parsing>Validating Credit Card Numbers (0) 2019.04.26