Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Date & Time
#time
#24h
#clock
#datetime

Time (24-hour)

Matches a time in 24-hour format. Supports both HH:MM and HH:MM:SS.

Scheduling formsCalendar appsTimetable validation
/
/
Risk
Test String
4 matches
(…)Group #1Capturing group — captures matched text for reuse or extraction
[…]?Character class […]Matches any single character listed in this set — repeated zero or one time (optional) · ? — zero or one time (optional)
[…]Character class […]Matches any single character listed in this set
||| — alternation: matches expression on left OR right
22'2' — literal character
[…]Character class […]Matches any single character listed in this set
::':' — literal character
[…]Character class […]Matches any single character listed in this set
0-50-50-5 — range from '0' to '5'
[…]Character class […]Matches any single character listed in this set
0-90-90-9 — range from '0' to '9'
(…)?Group #2Capturing group — captures matched text for reuse or extraction — repeated zero or one time (optional) · ? — zero or one time (optional)
::':' — literal character
[…]Character class […]Matches any single character listed in this set
[…]Character class […]Matches any single character listed in this set
Pattern: 44 charsInput: 29 chars
100% client-side · private

Valid Examples

  • 09:30
  • 23:59:59
  • 00:00
  • 12:00:00

Invalid Examples

  • 25:00
  • 12:60
  • 9:5
  • 24:01

Usage & Integration

Validate Time (24-hour) natively in your backend or frontend without copying regex strings.

Node / Edge

import { validate } from '@regexto/validators';

validate('time-24h', '...');

Python

from regexto_validators import validate

validate("time-24h", "...")

Go

import "github.com/regex-to/validators-go"

valid, err := validators.Validate("time-24h", "...")

PHP

use RegexTo\Validators\Validator;

Validator::validate('time-24h', '...');

Rust

use regexto_validators::validate;

let is_valid = validate("time-24h", "...").unwrap();