<?xml version="1.0" encoding="windows-1252"?>
<node id="83405" title="Regular Expression for MAC Address" created="2001-05-25 20:05:14" updated="2005-08-08 12:11:11">
<type id="115">
perlquestion</type>
<author id="34935">
marius</author>
<data>
<field name="doctext">
Monks,&lt;br&gt;
Does anyone have a regex that will successfully match a MAC address that is better than the following?&lt;br&gt;&lt;br&gt;I'd like to be able to match the 00:00:00:00:00:00 or the 00-00-00-00-00-00 notation.  Thanks!&lt;bR&gt;&lt;br&gt;
&lt;code&gt;
[0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f][:-][0-9a-f][0-9a-f]
&lt;/code&gt;
&lt;br&gt;&lt;br&gt;-marius</field>
</data>
</node>
