Tested regular expressions you can open in the tester, read the explanation of and adapt. Each pattern comes with sample text and unit tests. Save your own pattern with Save & share and tick “publish” to add it here.
4 patterns
^(?<ip>\S+) \S+ \S+ \[(?<time>[^\]]+)\] "(?<method>[A-Z]+) (?<path>\S+) [^"]*" (?<status>\d{3}) (?<size>\d+|-)(?: "(?<referrer>[^"]*)" "(?<agent>[^"]*)")?
Parses the combined log format into named groups: ip, time, method, path, status, size, referrer and agent.
\b[\da-fA-F]{2}([:-])(?:[\da-fA-F]{2}\1){4}[\da-fA-F]{2}\b
Six pairs of hex digits separated by colons or hyphens (the same separator throughout).
^\s+at ([\w$.]+)\.([\w$<>]+)\(([^:)]+)(?::(\d+))?\)
Each "at package.Class.method(File.java:123)" line with class, method, file and line number in groups.
^(?<ts>\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:[.,]\d+)?)\s+(?<level>TRACE|DEBUG|INFO|WARN(?:ING)?|ERROR|FATAL)\s+(?<msg>.*)$
Timestamp, level and message of typical application log lines (Spring Boot, Log4j, Python logging).