Unix Timestamp
beginnerMatches Unix timestamps (seconds or milliseconds since epoch).
timestampunixepochparsing
Pattern
/\b1[0-9]{9}(?:\d{3})?\b/gTry It
0 of 6 strings matched
Explanation
Matches 10-digit (seconds) or 13-digit (milliseconds) Unix timestamps starting with 1. Covers dates from 2001 to 2286.
Test Strings
Matching
- 1704067200
- 1704067200000
- 1609459200
Non-matching
- 999999999
- 20240115
- abc
Language Compatibility
| Language | Support |
|---|---|
| JS | Full support |
| PYTHON | Full support |
| JAVA | Full support |
| PHP | Full support |
| GO | Limited support (ASCII-only word boundaries) |
Code Snippets
const regex = /\b1[0-9]{9}(?:\d{3})?\b/g;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);