From 439f0b367116ea96b9b31f7433ecaa8fd364a1e3 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sat, 20 Jul 2024 14:55:12 +0200 Subject: [PATCH] Fixed parsing of \" in "". --- src/fr/devinsy/logar/app/log/parser/AccessLogParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fr/devinsy/logar/app/log/parser/AccessLogParser.java b/src/fr/devinsy/logar/app/log/parser/AccessLogParser.java index be3751e..dfe769c 100644 --- a/src/fr/devinsy/logar/app/log/parser/AccessLogParser.java +++ b/src/fr/devinsy/logar/app/log/parser/AccessLogParser.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Christian Pierre MOMON + * Copyright (C) 2021-2024 Christian Pierre MOMON * * This file is part of Logar, simple tool to manage http log files. * @@ -39,7 +39,7 @@ public final class AccessLogParser implements LineParser private static Logger logger = LoggerFactory.getLogger(AccessLogParser.class); public static Pattern COMBINED_ACCESSLOG_LINE_PATTERN = Pattern.compile( - "^(?[a-zA-F0-9\\\\:\\\\.]+) - (?[^\\[]+) \\[(?[^\\]]+)\\] \"(?[^\"]*)\" (?\\d+) (?\\d+) \"(?[^\"]*)\" \"(?[^\"]*)\".*$"); + "^(?[a-zA-F0-9\\\\:\\\\.]+) - (?[^\\[]+) \\[(?[^\\]]+)\\] \"(?([^\"]|\\\")*)\" (?\\d+) (?\\d+) \"(?([^\"]|\\\")*)\" \"(?([^\"]|\\\")*)\".*$"); /** * Instantiates a new log parser.