Key Facts
- Category
- Development
- Input Types
- textarea, text, checkbox, number
- Output Type
- json
- Sample Coverage
- 4
- API Ready
- Yes
Overview
The Named Group Tester is a web-based utility for parsing and extracting named capture groups from regular expressions. It supports ES2018 syntax, allowing you to test patterns against input text and view matches with named groups for efficient data extraction and validation.
When to Use
- •When extracting specific fields from structured text like dates, URLs, or coordinates.
- •When parsing log files or text data to capture named segments for analysis.
- •When developing or debugging regex patterns that use named capture groups.
How It Works
- •Enter your regex pattern with named groups using the (?<name>...) syntax.
- •Input the text to test, with an option for batch mode to process multiple lines.
- •Configure regex flags and set a maximum results limit as needed.
- •View extracted matches and named groups in a table or export to JSON/CSV.
Use Cases
Examples
1. Extracting Dates from Text
Data Analyst- Background
- You have a dataset with date strings in YYYY-MM-DD format that need to be parsed into components.
- Problem
- Manually splitting date strings is inefficient and prone to errors.
- How to Use
- Enter the regex pattern (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}) and paste the date strings into the text input.
- Example Config
-
Pattern: (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2}), Flags: g - Outcome
- Each date is parsed into named groups year, month, and day, displayed in a table for easy review or export.
2. Batch Processing Log Entries
System Administrator- Background
- Server logs contain unstructured entries with timestamps, severity levels, and messages.
- Problem
- Extracting structured data from log lines manually is time-consuming and error-prone.
- How to Use
- Enable batch mode, paste multiple log lines, and use a regex pattern to capture named groups for timestamp, level, and message.
- Example Config
-
Pattern: (?<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) (?<level>\w+) (?<message>.*), Batch Mode: true - Outcome
- All log entries are parsed into structured data with named fields, ready for analysis or export to CSV.
Try with Samples
text, regexRelated Hubs
FAQ
What is a named capture group in regex?
A named capture group is a part of a regex pattern that captures matched text and assigns it a name, using the syntax (?<name>...).
How do I test a regex pattern with this tool?
Enter your pattern with named groups, input the text, and click to see all matches with their named group values displayed.
Can I process multiple test strings at once?
Yes, enable batch mode to test each line of input as a separate string for batch processing.
What output formats are available?
Results can be viewed in an organized table or exported to JSON or CSV format for further use.
Is there a limit on the number of matches?
You can set a maximum results limit, defaulting to 100, to control the output size and performance.