RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(((\d|([a-f]|[A-F])){2}:){5}(\d|([a-f]|[A-F])){2})$|^(((\d|([a-f]|[A-F])){2}-){5}(\d|([a-f]|[A-F])){2})$|^$
Description
Designed to verify a MAC address with no spaces allowed, hex values separated by linux style separator ":" or by windows style separator "-". Also empty string entry is allowed.
Matches
A0:B1:C2:D3:E4:F5|A0-B1-C2-D3-E4-F5|
Non-Matches
A0-B1-C2-D3-E4:F5|A0 - B1 - C2 - D3 - E4 - F5|A0:B1:C2:D3:E4:G5
Author Rating: Not yet rated. Yavuz Oztemel
Source Yavuz Oztemel
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials