Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Network
#mac
#network
#hardware
#address

MAC Address

Matches a MAC (Media Access Control) address in both colon-separated and hyphen-separated formats.

Network device identificationAccess control listsDevice registration
/
/
Risk
Test String
3 matches
(…){5}Group #1Capturing group — captures matched text for reuse or extraction — repeated exactly 5 times · {5} — exactly 5 times
[…]{2}Character class […]Matches any single character listed in this set — repeated exactly 2 times · {2} — exactly 2 times
[…]Character class […]Matches any single character listed in this set
[…]{2}Character class […]Matches any single character listed in this set — repeated exactly 2 times · {2} — exactly 2 times
0-90-90-9 — range from '0' to '9'
a-fa-fa-f — range from 'a' to 'f'
A-FA-FA-F — range from 'A' to 'F'
Pattern: 38 charsInput: 53 chars
100% client-side · private

Valid Examples

  • 00:1A:2B:3C:4D:5E
  • 00-1A-2B-3C-4D-5E
  • ff:ff:ff:ff:ff:ff

Invalid Examples

  • 00:1A:2B:3C:4D
  • GG:HH:II:JJ:KK:LL
  • 001A2B3C4D5E

Usage & Integration

Validate MAC Address natively in your backend or frontend without copying regex strings.

Node / Edge

import { validate } from '@regexto/validators';

validate('mac-address', '...');

Python

from regexto_validators import validate

validate("mac-address", "...")

Go

import "github.com/regex-to/validators-go"

valid, err := validators.Validate("mac-address", "...")

PHP

use RegexTo\Validators\Validator;

Validator::validate('mac-address', '...');

Rust

use regexto_validators::validate;

let is_valid = validate("mac-address", "...").unwrap();