Validating Credit Card Numbers

  • + 0 comments

    pattern = r"^(?!.*([0-9])(?:-?\1){3})([456]\d{3})-?(\d{4})-?(\d{4})-?(\d{4})$"