Regex Matcher
Regex match extractor online. Extract all matches and capture groups from text. Export matches as JSON, CSV, or plain list—free regex extraction tool.
Pattern with Capture Groups
Use (...) for groups, (?<name>...) for named groups
💡 Tips
- • Use
()to create capture groups - • Named groups:
(?<name>pattern) - • Non-capturing groups:
(?:pattern) - • Export to JSON for structured data, CSV for spreadsheets
Features
- Extract all capture groups (named and numbered) from text
- Card and Table view modes for match results
- Filter to unique matches only
- Sort by position, length, or alphabetically
- Statistical dashboard: total, unique, groups, average length
- Export results as JSON, CSV, and plain text
- Expand/collapse individual match cards for detailed inspection
Common Use Cases
- Parse log files and extract structured fields (timestamps, levels, messages)
- Scrape and extract URLs, emails, or IDs from HTML or Markdown
- Extract named entities across a large body of text
- Validate and collect all matching tokens from code snippets
- Export structured data from unstructured text to JSON or CSV
Capture Groups & Named Groups
Capture groups are the most powerful feature of regular expressions. By wrapping part of your pattern in parentheses (...), you tell the engine to "capture" that portion of the match separately from the full match.
Named capture groups — (?<name>...) — give each group a descriptive identifier instead of a number. This makes your pattern self-documenting and allows referencing groups by name in replacements and APIs.
Example: the pattern (?<user>\w+)@(?<domain>\w+\.\w+) on "john@example.com" captures user: "john" and domain: "example.com" — clean, structured data from raw text.
Examples
(?<user>\w+)@(?<domain>\w+)\.(?<tld>\w+)(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})\[(INFO|WARN|ERROR)\] (.+)Frequently Asked Questions
The Tester focuses on highlighting matches inline within your text and is great for verifying your pattern is correct. The Matcher focuses on extracting and exporting the matched data — especially capture groups — making it ideal for data extraction workflows.
Named groups use the syntax (?<name>pattern). Instead of referencing by number ($1), you reference by name ($<name>). They appear in the "Capture Groups" panel with their name as the label, making results much more readable when extracting structured data.
It filters the match list to show only distinct matches — duplicates are removed. This is useful when extracting unique values from a large text, such as a deduplicated list of all URLs or email addresses that appear.
Yes. The Export button lets you download results as .json (structured, with groups), .csv (spreadsheet-friendly), or .txt (one match per line). The Quick Copy section in the results panel lets you copy any format to clipboard instantly.
The Matcher is designed to find all occurrences, so the global flag is always active. Other flags (case-insensitive i, multiline m) can be toggled as needed.
💡 Tips
- Use named capture groups (<code>(?<name>...)</code>) for self-documenting patterns — the names appear as column headers in CSV export.
- The "Unique only" filter is invaluable for deduplication tasks like collecting all distinct emails from a mailing list.
- Sort by "Length" to quickly find the longest or shortest matches — useful for finding outliers.
- Export to JSON when you need structured data with group names preserved; use CSV for spreadsheet imports.
- For non-capturing groups — when you only need to group for quantifiers but don't care about capturing — use <code>(?:...)</code> for better performance.