regex-patterns

Build practical regular expressions for validation, parsing, extraction, and search-and-replace tasks.

2|1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/albertdobmeyer/opentrapp --skill regex-patterns-albertdobmeyer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: regex-patterns
Source: https://github.com/albertdobmeyer/opentrapp/tree/main/workloads/skills/skills/regex-patterns
Command: npx skills add https://github.com/albertdobmeyer/opentrapp --skill regex-patterns-albertdobmeyer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write, understand, and debug regular expressions without trial-and-error guesswork. It saves time when you need to validate input, find patterns in logs, extract structured values, or refactor text safely.

Core Features & Use Cases

  • Validation Patterns: Use ready-made regexes for emails, URLs, IP addresses, phone numbers, dates, passwords, UUIDs, and version strings.
  • Parsing and Extraction: Pull useful fields from logs, JSON snippets, code, and plain text with practical capture-group examples.
  • Search-and-Replace Help: Apply regex-based replacements for code refactoring, cleanup, and bulk text edits across JavaScript, Python, Go, and shell tools.
  • Debugging Guidance: Understand greedy vs lazy matching, escaping rules, multiline behavior, and performance pitfalls that commonly break patterns.
  • Use Case: If a log file contains mixed error lines and timestamps, this Skill can help you isolate the exact entries, extract key fields, and rewrite them into a cleaner format.

Quick Start

Use the regex-patterns skill to find the email addresses in the attached text file and explain the best pattern to extract them safely.

Frequently Asked Questions about regex-patterns

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

FAQPage Schema
How do I extract specific fields like IPs and timestamps from log files using regex?

To extract specific fields from log files using regex, apply capture groups to isolate mixed error lines and timestamps. This Skill provides practical patterns for parsing logs and pulling structured values from plain text safely across JavaScript, Python, Go, and shell tools.

What is the best regex pattern for validating emails, URLs, and UUIDs?

The best regex pattern for validating emails, URLs, and UUIDs relies on ready-made validation strings. This Skill offers pre-built patterns for these formats, along with phone numbers, dates, passwords, and version strings, ensuring reliable matching without trial-and-error guesswork.

How do I perform a search-and-replace for code refactoring across multiple languages?

To perform a search-and-replace for code refactoring, apply regex-based replacements for bulk text edits and cleanup. This Skill guides you through language-specific examples in JavaScript, Python, Go, and shell scripting to safely rewrite text formats.

Why does my regex pattern fail on multiline text or cause performance issues?

Regex patterns often fail on multiline text or cause performance issues due to greedy matching and escaping pitfalls. This Skill provides debugging guidance to understand multiline behavior, lazy matching, and performance-safe alternatives for reliable pattern execution.

Can I use regular expressions with grep and sed for shell scripting tasks?

Yes, you can use regular expressions with grep and sed for shell scripting tasks. This Skill applies to string-processing workflows across shell tools, providing syntax guidance and ready-to-use patterns for search, extraction, and replacement operations.

What is the difference between greedy and lazy matching when parsing text?

The difference between greedy and lazy matching when parsing text is that greedy consumes as much as possible while lazy stops at the first match. This Skill explains these mechanisms to help you avoid common debugging pitfalls and extract structured values reliably.