Regular Expression Pattern
/gGlobal search – finds all matches rather than stopping after the first.
Quick Syntax Reference
Tap to append snippets to your pattern.Pattern Breakdown
2 tokens explained
| Token | Explanation |
|---|---|
| \d | Digit character (0-9). |
| + | Quantifier – previous token appears 1 or more times. |
Test String
Highlighted Matches:
The year is 2024 and 2025 is next year.
Match Results
✓ Found 2 matches
Match #1Position: 12-16
2024
Match #2Position: 21-25
2025
Common Patterns
Export Code
const regex = /\d+/g;
const matches = text.match(regex);