2013å¹´02æ09æ¥22:30 ã«ãã´ãªTipsLightweight Languages regexp - 㧠Apache Combined Log ã Parse ãã ãã ãåæã ã¾ãã¦ã Apache Combined Log ã LTSV ã« ãæ¸ããå¾ã§ã¯ã combined2ltsv.plã®æåã®ãã¼ã¸ã§ã³ã®parserã¯ãããªã£ã¦ãã¾ããã sub parse_line_ng { my $line = shift; my %rec; ( $rec{host}, $rec{ident}, $rec{user}, $line ) = split ' ', $line, 4; $line =~ s/^(\[.*?\]) //; $rec{time} = $1; $line =~ s/^\"(.*?)\" //; $rec{req} = $1; ( $rec{status},
{{#tags}}- {{label}}
{{/tags}}