Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
cron\((([0-9]{1,2}|\*)\,?\/?)+\s(([0-9]{1,2}|\*)\,?)+\s(([0-9]{1,2}|\*|\?)\,?)+\s(([0-9]{1,2}|\*|\?|(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))\,?)+\s(([0-9]{1,2}[FL]?|\*|\?|(SAT|SUN|MON|TUE|WED|THU|FRI)\#?[0-9]?)\,?\-?)+\s(([0-9]{1,4}|\*)\,?\-?)+\)
/
gm

Description

A incomplete regex for validating AWS cron expressions

Submitted by anonymous - 2 years ago