Key Facts
- Category
- Text Processing
- Input Types
- textarea, select, text, checkbox, number
- Output Type
- json
- Sample Coverage
- 4
- API Ready
- Yes
Overview
Text Pattern Stats is a utility tool that performs frequency analysis on text to identify and count patterns such as numbers, email addresses, URLs, and more. It helps users extract statistical insights from unstructured text data quickly and accurately.
When to Use
- •When you need to count occurrences of specific patterns like numbers or emails in a large text document.
- •When analyzing logs, reports, or datasets to find common elements such as phone numbers or dates.
- •When preparing text data for further processing by extracting structured information based on patterns.
How It Works
- •Input your text into the text area provided.
- •Select a pattern type from the dropdown, such as numbers, emails, or URLs, or choose 'Custom Regex' to define your own.
- •Configure optional settings like case sensitivity, show distribution, and maximum results.
- •The tool scans the text and returns a JSON output with statistics, including frequency counts and distribution details if enabled.
Use Cases
Examples
1. Extracting Numbers from Financial Reports
Financial Analyst- Background
- A financial analyst has a text-based report with scattered numerical data on revenues and expenses.
- Problem
- Need to quickly identify and count all numerical values to summarize financial metrics without manual review.
- How to Use
- Paste the report text into the text input, select 'Numbers' as the pattern type, and set max results to 200.
- Outcome
- The tool returns a JSON list of all numbers with their frequencies, enabling efficient data aggregation for analysis.
2. Auditing Email Addresses in Server Logs
System Administrator- Background
- Server logs contain entries with email addresses from user activities and notifications.
- Problem
- Need to find all unique email addresses for security auditing and compliance checks.
- How to Use
- Input the log text, choose 'Email Addresses' as the pattern type, and enable case sensitivity if required.
- Outcome
- A JSON output with all email addresses and their occurrence counts, facilitating quick audit and monitoring.
3. Custom Pattern Search in Code Documentation
Software Developer- Background
- A developer has documentation with code snippets and function names.
- Problem
- Want to find all instances of a custom pattern, such as function names starting with 'get', for code review.
- How to Use
- Paste the documentation text, select 'Custom Regex', and enter the pattern '\bget\w*\b' in the custom regex field.
- Outcome
- The tool identifies and counts all matches, providing insights into code usage and helping with refactoring decisions.
Try with Samples
text, regexRelated Hubs
FAQ
What pattern types are supported?
Numbers, uppercase words, capitalized words, email addresses, URLs, phone numbers, dates, and custom regex patterns.
Can I use my own regex pattern?
Yes, select 'Custom Regex' from the pattern type dropdown and enter your pattern in the custom regex field.
What does the 'Show Distribution' option do?
It includes a frequency distribution chart in the JSON results, showing how often each pattern appears in the text.
Is there a limit to the text length or number of results?
The tool can handle large texts, but you can set a maximum number of results (10 to 500) to control output size and performance.
How are the results formatted?
Results are returned in JSON format, detailing each pattern found, its count, and distribution if enabled.