Skip to content

Commit b68c166

Browse files
committed
org-ts-regexp0: Fix matching timestamps with no day name
* lisp/org.el (org-ts-regexp1): Update regexp to match strings like "2022-04-29 02:00" with no day name. Reported-by: Russell Adams <RLAdams@adamsinfoserv.com> Link: https://orgmode.org/list/87zgk8tc17.fsf@localhost
1 parent eeae6ed commit b68c166

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lisp/org.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ FULL is given."
436436
This one does not require the space after the date, so it can be used
437437
on a string that terminates immediately after the date.")
438438

439-
(defconst org-ts-regexp1 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)"
439+
(defconst org-ts-regexp1 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\)\\(?: *\\([^]+0-9>\r\n -]+\\)\\)?\\( \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)"
440440
"Regular expression matching time strings for analysis.")
441441

442442
(defconst org-ts-regexp2 (concat "<" org-ts-regexp1 "[^>\n]\\{0,16\\}>")

0 commit comments

Comments
 (0)