Matching Digits & Non-Digit Characters

  • + 1 comment

    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?