From 887c8ef63b158840739c2a2c47dd570bc8ae6b8f Mon Sep 17 00:00:00 2001 From: MTDL9 <40929090+MTDL9@users.noreply.github.com> Date: Wed, 3 Apr 2019 07:13:57 +0200 Subject: [PATCH] Make day optional in pattern to match syslog "Feb 11" date for #3 --- syntax/log.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax/log.vim b/syntax/log.vim index 06ca3ea..1a5b8e4 100644 --- a/syntax/log.vim +++ b/syntax/log.vim @@ -43,8 +43,8 @@ syn region logString start=/'\(s \|t \| \w\)\@!/ end=/'/ end=/$/ end=/s / s syn match logDate '\d\{2,4}[-\/]\(\d\{2}\|Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)[-\/]\d\{2,4}T\?' " Matches 8 digit numbers at start of line starting with 20 syn match logDate '^20\d\{6}' -" Matches Fri Jan 09 -syn match logDate '\(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\) \(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\) \d\{2}' +" Matches Fri Jan 09 or Feb 11 +syn match logDate '\(\(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\) \)\?\(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\) \d\{2}' " Matches 12:09:38 or 00:03:38.129Z or 01:32:12.102938 +0700 syn match logTime '\d\{2}:\d\{2}:\d\{2}\(.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\>'