Regex Parser

Our Regex Parser was introduced in in LogViewPlus 2.3.5 to allow users who are already familiar with regular expressions a quick and easy way to configure parsers.  However, the Regex Parser is not performant when compared to the Pattern Parser.  For this reason, we always recommend using the Pattern Parser - especially for large log files.

The idea behind the Regex Parser is to use a standard regular expression to parse the log file.  In this case, the field names in the regular expression should be valid Conversion Specifiers.  If an unknown field is found, it will be assumed to be the name of a column and the string conversion specifier (%s) will be used.

When using conversion specifiers in the Regex Parser, you can use either the full name of the specifier or the abbreviation.  For example, the following regular expressions would be considered equivalent:

(?<date>.*?) - (?<priority>.*?) \[(?<thread>.*?)\] (?<logger>.*?) - (?<message>.*)

(?<d>.*?) - (?<p>.*?) \[(?<t>.*?)\] (?<c>.*?) - (?<m>.*)

Either of the regular expressions above could be used to parse a log like:

09 MAY 2019 10:50:14,125 - INFO  [Thread_10] MyServer - My Server initializing...

All fields defined in the regular expression must be found on the same line of the log entry.  If the log entry contains a multi-line message, this will be processed automatically by the parser after the regular expression parse fails.  In other words, if a line cannot be parsed, it will be assumed to be a continuation of the previous log entry's message.

The Regex Parser currently does not allow for custom date formats.  Therefore, the date must be in a format which can be auto-detected by LogViewPlus.  If you are able to open and parse the file using the Basic Parser, then this should not be an issue.  However, if you do have problems, please contact support.

< >