title: Regex to match MAC address and also extract it's values
body: <p>I'm trying to first check if a string confirms the format of a MAC address, and if it does I would like to extract all the byte values out of the string. </p>
  
  <p>So far I wrote this, and it successfully matches if the format of a mac address is correct or not:</p>
  
  <pre><code> mac_regx = re.compile(r'^([0-9A-F]{1,2})(\:[0-9A-F]{1,2}){5}$', re.IGNORECASE)
  </code></pre>
  
  <p>But when I use this regex to extract the byte values, I'm only getting the first and the last one:</p>
  
  <pre><code>(Pdb) print(mac_regx.findall('aa:bb:cc:dd:ee:ff'))
  [('aa', ':ff')]
  </code></pre>
  
  <p>I know I could simply <code>split</code> by <code>:</code> and that would do the job. I was just hoping to be able to do both, the matching and value extraction, in only one step with one regex.</p>