Skip to content

Instantly share code, notes, and snippets.

@mattbertolini
Created April 26, 2012 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattbertolini/2494893 to your computer and use it in GitHub Desktop.
Save mattbertolini/2494893 to your computer and use it in GitHub Desktop.
A regular expression pattern for a MAC (MAC-48/EUI-48) address.
public static final String EUI_48_PATTERN = "^(?i)(?:[0-9a-f]{2}[-:]?){5}[0-9a-f]{2}|(?:[0-9a-f]{4}\\.?){2}[0-9a-f]{4}$";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment