String extractor
Pull every match of a regular expression out of your text — capture groups, first match only, case-insensitive mode, deduplication and sorting, with invalid patterns rejected and a 1,000,000 character cap against catastrophic backtracking.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Extracted values
One value per line, ready to copy.
Enter a pattern to start extracting
Matches: 0 · Output: 0 · Dropped: 0
What this tool does
- Harvest order numbers, request IDs or timestamps from logs by pattern.
- Isolate well-formed fragments (prices, dates, IPs) from scraped page text.
- Reconnaissance before a rewrite: see exactly what a pattern matches first.
Example
Input
version 1.2.3 version 10.20.30 build 4.5.6
Output
version 1.2.3 version 10.20.30
Capture group 2 returns just the digits; switch to group 1 for the letter code.
Frequently asked questions
How do capture groups work?
Group 0 returns the whole match, 1 returns the first parenthesised part, and so on. If that group did not participate in a given match, the row is dropped and counted under “Dropped”.
What happens with an invalid pattern?
It reports an error instead of silently returning nothing. Only the g, i, m, s, u and y flags are accepted; anything else is rejected.
Can a regex freeze the page?
The risk is bounded: input longer than 1,000,000 characters is rejected and matches are capped at 200,000. Still avoid nested quantifiers such as (a+)+.
How do I keep only the first match?
Tick “First match only”. It is cheaper than truncating the result afterwards and is the right choice for long inputs where only the first hit matters.
Keywords:正则提取字符串提取regex extract捕获组批量匹配正则批量文本提取string extractor