Regex · Hexadecimal number · Free
Hexadecimal number regex.
Matches a hexadecimal literal written with a 0x prefix. Copy the pattern below, see what it matches, then tweak it for your exact case with the free generator.
The pattern
/\b0[xX][0-9a-fA-F]+\b/g
✓ Matches
0xFF0x1a2b0X00✗ Doesn't match
FF0x123Need a variation? Generate one
Other common patterns
Parsing and pattern-matching are everywhere in AI systems. MindloomHQ teaches you to build them for real — agents, RAG, pipelines — with projects and certificates.
Explore MindloomHQ →