Variable: diary-time-regexp

diary-time-regexp is a variable defined in diary-lib.el.gz.

Value

"[0-9]?[0-9]\\([AaPp][mM]\\|\\([Hh]\\([0-9][0-9]\\)?\\|[:.][0-9][0-9]\\)\\([AaPp][Mm]\\)?\\)"

Documentation

Regular expression matching a time of day.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
(defconst diary-time-regexp
  ;; Accepted formats: 10:00 10.00 10h00 10h 10am 10:00am 10.00am
  ;; Use of "." as a separator annoyingly matches numbers, eg "123.45".
  ;; Hence often prefix this with "\\(^\\|\\s-\\)."
  ;; FIXME: this regexp is too liberal to be used for parsing times from
  ;; entries by `diary-icalendar-parse-time', hence the existence of
  ;; `diary-icalendar-time-regexp'.  Can we tighten it up so we don't
  ;; need both?
  (concat "[0-9]?[0-9]\\([AaPp][mM]\\|\\("
          "[Hh]\\([0-9][0-9]\\)?\\|[:.][0-9][0-9]"
          "\\)\\([AaPp][Mm]\\)?\\)")
  "Regular expression matching a time of day.")