Regex · Decimal number · Free
Decimal number regex.
Matches an integer or decimal number, optionally negative. Copy the pattern below, see what it matches, then tweak it for your exact case with the free generator.
The pattern
/-?\d+(?:\.\d+)?/g
✓ Matches
3.14-0.542✗ Doesn't match
1,000abc.Need 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 →