We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Matching Digits & Non-Digit Characters
Matching Digits & Non-Digit Characters
Sort by
recency
|
163 Discussions
|
Please Login in order to post a comment
Java 15
my python solution: r"^(\d{2}\D){2}\d{4}"
java pattern : "^([0-9]{2}\D{1}){2}[0-9]{4}" or (\d{2}\D){2}\d{4}
java solution
python 3 Regex_Pattern = r"^\d{2}\D\d{2}\D\d{4}$" # Do not delete 'r'.
Returns failure for test case 4 10a10.2015452254 Why is the expected result true? 10a10.2015452254 is not of the form xxXxxXxxxx but rather xxXxxXxxxxxxxxxx. It should not match and the previous question complained about loosing matchin by failing to end with $. Why the inconsistancy?