Skip to content
Flavor
ECMAScript
Deadline
500 ms
Runtime
Browser

Split text at regular-expression delimiters

Turn a delimiter pattern into a structured parts list with an explicit empty-part policy.

Local processingNo sign-upKillable worker

Input

Use a noncapturing group when delimiter text should not appear as a part.

Local

Flags affect delimiter matching; g is not required by String.prototype.split.

Split parts report

Submit the example or replace it with your own values. User matching runs only in a disposable browser worker.

What this tool proves

Explicit ECMAScript behavior

Regular-expression splitting differs from matching: delimiters are removed, but capturing groups inside the delimiter are inserted into the result by JavaScript. Leading, trailing, or adjacent delimiters can also create empty parts.

Delimiter captures and empty parts are deliberate output choices

Regular-expression splitting differs from matching: delimiters are removed, but capturing groups inside the delimiter are inserted into the result by JavaScript. Leading, trailing, or adjacent delimiters can also create empty parts.

The omit-empty setting is applied after JavaScript split semantics, so captured delimiter values remain visible unless they are empty. The worker requests at most 10,001 parts to detect truncation and returns at most 10,000.

Bounded execution protects the page without hiding risk

Any operation that runs a user pattern is isolated in a disposable Web Worker. Tool Swim terminates that worker after 500 ms, caps patterns at 4 KiB and text at 256 KiB, and never runs user matching on the interface thread.

Pattern, flags, text, replacement, matches, and explanations stay in the current browser tab. The public tool makes no developer API request, stores no preset, and works without an account or telemetry.

Primary references

Questions and answers

Related Regex tools