|
From: | Jean Louis |
Subject: | Re: [SOLVED]: Re: Help improve regular expression for 24 hours format |
Date: | Sat, 26 Nov 2022 21:08:31 +0300 |
User-agent: | Mutt/2.2.7+37 (a90f69b) (2022-09-02) |
* Emanuel Berg <incal@dataswamp.org> [2022-11-26 18:12]: > Jean Louis wrote: > > > I did the exercise and I came up with the below. It looks > > much better this way. Thanks much. > > > > (defvar rcd-rx-time (rx line-start > > (or (seq "0" (any digit)) (seq "1" (any digit)) (seq > > "2" (any "0-3"))) > > ":" > > (seq (any "0-5") (any digit)) > > line-end) > > "Regular expression for 24 hours format") > > > > -> "^\\(?:0[[:digit:]]\\|1[[:digit:]]\\|2[0-3]\\):[0-5][[:digit:]]$" > > This is also something that belongs in a library. Maybe it exists already somewhere? I use (org-calendar-select) but I missed selecting time. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/
[Prev in Thread] | Current Thread | [Next in Thread] |