🌲Log Parsing Regex Generator

Paste a log sample to build and test a regex

You Might Also Need

Pull a regex for your own log format out of a sample

Unlike a parser that already knows a fixed format, this one takes the log you actually run. The first line is split by your delimiter and your quote and bracket rules to find the fields, and a regular expression with one named group per field is written from it. Every line you pasted is then run against that expression so you can see which lines match and which do not.

Each field pattern is narrowed by the shape of the value: anything but a quote inside quotes, anything but a closing bracket inside brackets, and a digit pattern for all-digit fields. Named group syntax arrived in ECMAScript 2018, so older browsers cannot use it, and there the tool falls back to numbered groups and says so, as of October 2026.

Because the format comes from the first line alone, logs whose field count varies will fail on some lines. Multi-line stack traces and nested quotes are out of scope, and field names cannot contain dots. Run the generated expression once in the regex engine of the language you will ship it in.

Frequently Asked Questions

Why build the pattern from the first line only?

Inferring a shared format across lines loosens the pattern as soon as one line is missing a field. Fixing the format from the first line and testing the rest exposes the odd lines as failures instead of quietly covering them.

Some lines fail. What should I check?

Start with the field count and the delimiter. A value containing spaces that is not wrapped in quotes or brackets adds a field and fails. Turning a grouping option on or changing the delimiter usually fixes it.

Can a field name contain a dot?

No. A regex named group has to start with a letter and use letters, digits and underscore only, so a name with a dot is reported as an error before anything is generated.