All languages

Java

You're viewing a free preview. Sign in free to read every script.

Why this exists Logs, config files and command output are text, and a regular expression (regex) is the tool for pulling structure out of text: the level and service from a log line, every IP address in a message, the…

Java Basics: Regular Expressions for Log Parsing with Pattern, Matcher and Named Groups

Extract fields from log lines, find every IP address, mask secrets before logging, and avoid the classic mistakes (split with a dot, matches versus find, greedy matching, unquoted replacements), all run for real.

Sign in free to read this script, along with the rest of the library.

Sign in free