title: How to determine the type of credit card?
body: <p>For a school assignment I'm trying to determine the type of credit card a user has when they type in their card number. A master card starts with 51-55. Extra zeros in front of that number would be considered valid. I've reviewed other threads on how to integrate this into python and although I could just copy and paste the code I still don't really understand whats going on or how they bypass the zeroes in front?</p>
  
  <p>Heres an example of the Master card code to do this:</p>
  
  <pre><code>^5[1-5][0-9]{5,}|222[1-9][0-9]{3,}|22[3-9][0-9]{4,}|2[3-6][0-9]{5,}|27[01][0-9]{4,}|2720[0-9]{3,}$ 
  </code></pre>
  
  <p>Could anyone explain to me what is going on? Thank you for your time. </p>