Regular Expression To Match Julian Date (YYDDD)

A regular expression to match a Julian date in the format YYDDD.

/^([0-9]{2})(00[1-9]|0[1-9][0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-6])$/

Matches:

  • 11111
  • 21013
  • 19325

Non-matches:

  • 75000
  • 04567
  • 12987

See Also: