Regex Cheatsheet - Regular Expression Quick Reference

Quick reference for regular expression patterns. Character classes, quantifiers, anchors, and common patterns.

Share
Back to Regex Cheatsheet

Decimal Number Pattern

Common Pattern

Match number with optional sign and decimal

Pattern

^-?\d+(\.\d+)?$

Examples

3.14

Positive decimal

Matches: 3.14

-42.5

Negative decimal

Matches: -42.5

Related Tools

More Text Tools