Regular Expressions 101

Community Patterns

1...34567...884

CRON time expression validation

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^((((\d+,)+\d+|(\d+(\/|-|#)\d+)|\d+L?|\*(\/\d+)?|L(-\d+)?|\?|[A-Z]{3}(-[A-Z]{3})?) ?){5,7})|(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)$
/
gm

Description

Submitted by Aterfax - 3 months ago (Last modified 3 months ago)