changeset 24333:03cf9e15c988

(dired-move-to-filename-regexp): Prepend .* so that we find the last match if there are multiple matches.
author Richard M. Stallman <rms@gnu.org>
date Wed, 17 Feb 1999 02:23:44 +0000
parents 29c0557957ba
children c56b72e5f29d
files lisp/dired.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired.el	Wed Feb 17 00:15:34 1999 +0000
+++ b/lisp/dired.el	Wed Feb 17 02:23:44 1999 +0000
@@ -1369,10 +1369,13 @@
 	 (western (concat "\\(" month s dd "\\|" dd s month "\\)"
 			  s "\\(" HH:MM "\\|" s yyyy "\\|" yyyy s "\\)"))
 	 (japanese (concat mm k s dd k s "\\(" s HH:MM "\\|" yyyy k "\\)")))
-	 ;; Require the previous column to end in a digit.
+	 ;; The "[0-9]" below requires the previous column to end in a digit.
 	 ;; This avoids recognizing `1 may 1997' as a date in the line:
 	 ;; -r--r--r--   1 may      1997        1168 Oct 19 16:49 README
-    (concat "[0-9]" s "\\(" western "\\|" japanese "\\)" s))
+	 ;; The ".*" below finds the last match if there are multiple matches.
+	 ;; This avoids recognizing `jservice  10  1024' as a date in the line:
+	 ;; drwxr-xr-x  3 jservice  10  1024 Jul  2  1997 esg-host
+    (concat ".*[0-9]" s "\\(" western "\\|" japanese "\\)" s))
   "Regular expression to match up to the file name in a directory listing.
 The default value is designed to recognize dates and times
 regardless of the language.")