Extract Regex Matches
Enter a regular expression pattern and extract every matching piece of text from your input — great for finding specific patterns in large amounts of text.
What Does This Tool Do?
Regular expressions (regex) are powerful patterns for finding specific types of text. This tool takes your regex pattern and finds every occurrence in your text, giving you a clean list of all matches. For example, extract all phone numbers, all dates in a specific format, or any custom pattern you define.
Key Features
How to Use This Tool
- Paste your text into the Input box.
- Enter your regex pattern (e.g., \d+ for numbers, [a-z]+@\w+\.\w+ for emails).
- Adjust flags as needed (case-sensitive, global, multiline).
- Click Extract to find all matches.
How It Works
Your regex pattern is compiled into a JavaScript RegExp object with the flags you selected (g for global, i for case-insensitive, m for multiline). The pattern is then applied to your text using matchAll() and all matches are collected into the output list.
Common Use Cases
Frequently Asked Questions
What regex syntax is supported?
JavaScript regex syntax is fully supported, including character classes [a-z], quantifiers (+,*,?), anchors (^,$), groups ((...)), lookahead/lookbehind, and all standard metacharacters.
How do I escape special regex characters?
Backslash-escape any character that has special meaning in regex: \. for literal dot, \* for literal asterisk, \( for literal parenthesis, etc.
Related Tools
Link to This Tool
Copy and paste the code below to link to this tool from your website: