Live regex matching with groups, flags and a replace preview
Regex Splitter
Break text into pieces on any separator you can describe, even when the separators are inconsistent.
Loading tool…
How to use regex splitter
Paste the text and type the separator as a regular expression, or pick a preset.
Trim each piece and drop empty ones if you want a clean list.
Decide whether captured parts of the separator are kept as their own pieces.
Copy the pieces or download them as lines, a JSON array or a CSV column.
What this tool does
- Handles mixed separators such as commas and semicolons with any spacing in one pass.
- Presets for whitespace, sentences, blank lines and pipes.
- Keeps or drops captured separators, matching how String.split treats capture groups.
- Runs in a background worker with a time limit, so a slow pattern cannot freeze the page.
How the result is verified
When the separator is plain (no groups, not zero length) the pieces are joined back with the separators that were found and compared with your original text, which must match exactly.
Frequently asked questions
How is this different from splitting on a comma?
A regular expression can describe several separators and the spacing around them at once, such as \s*[,;]\s*, so "a, b;c" splits cleanly into three items.
What does keeping captured separators do?
If the pattern has a group, like (,|;), the matched separator is placed between the pieces in the output. Turn it off to get only the pieces.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Pull every match or capture group into a list, deduplicated and sorted
Escape special characters so text matches literally in a regex
Normalise quoting, trim cells and fix line endings