diff log_analyze.rb @ 1:4f7103163762 default tip

update
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Wed, 18 Jul 2018 18:03:58 +0900
parents b42d5cbbd972
children
line wrap: on
line diff
--- a/log_analyze.rb	Wed Jul 18 17:25:20 2018 +0900
+++ b/log_analyze.rb	Wed Jul 18 18:03:58 2018 +0900
@@ -7,7 +7,7 @@
 
 File.open(file,'r') do |f|
     f.each_line do |line|
-        if line =~ /\w \d{0,2} (?:\d{2}:?){3} #{user_name} ([\w.]+)\[\d+\]/
+        if line =~ /\w+ \d{0,2} (?:\d{2}:?){3} #{user_name} ([\w.]+)\[\d+\]/
             count[$1] += 1
         end
     end