regex-log

Extract structured data from log files using complex regular expressions.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Zurybr/lefarma-skills --skill regex-log
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: regex-log
Source: https://github.com/Zurybr/lefarma-skills/tree/main/letta/benchmarks/trajectory-only/regex-log
Command: npx skills add https://github.com/Zurybr/lefarma-skills --skill regex-log

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you extract specific, structured information from complex log files, especially when multiple conditions need to be met simultaneously.

Core Features & Use Cases

  • Complex Regex Construction: Build and refine regular expressions for intricate pattern matching.
  • Multi-Condition Extraction: Extract data only from log lines that satisfy several criteria (e.g., finding a date on a line that also contains an IP address).
  • Log Parsing Guidance: Provides strategies for incremental pattern building and verification.
  • Use Case: Extract the last recorded timestamp from log entries that contain a specific error code and an IP address.

Quick Start

Use the regex-log skill to find all IP addresses on lines containing the word 'ERROR'.

Frequently Asked Questions about regex-log

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract structured data like IP addresses and timestamps from log files?

To extract structured data from log files, construct regular expressions matching specific patterns like IP addresses, dates, and timestamps. This involves incremental pattern building to isolate and verify exact data fields from each log line.

What is the best way to parse log lines that meet multiple conditions simultaneously?

Parsing log lines with multiple conditions requires combining criteria using regular expression lookaheads and anchors. This ensures lines match only when satisfying several criteria simultaneously, such as containing both a specific error code and an IP address.

Can I use regex to find the last recorded timestamp for a specific error code in logs?

Yes, you can use regex to find the last recorded timestamp for a specific error code by composing a pattern combining anchors and lookaheads. This targets log entries containing the error code and extracts the final timestamp matching that pattern.

Does this regex approach work for extracting all IP addresses on lines containing a specific keyword?

Yes, this regex approach works for extracting all IP addresses on lines containing a specific keyword like 'ERROR'. By applying pattern composition, the regex matches lines with the keyword and extracts structured IP address data from those matched lines.

Why does my regular expression fail to match complex log patterns across multiple lines?

Regular expressions fail to match complex log patterns when lookaheads and anchors are incorrectly configured. Incremental pattern building and verification strategies ensure the regex correctly handles multiple conditions and structured data extraction.