Zerowidth CleanerAll measured guides

CLAUDE WATERMARK REMOVER · PRACTICAL TEST

Why does split() return commas after cleaning text?

Our split(/(,)/) includes captured commas in the result; split(",") does not. Cleanup removes the marker but changes neither rule, and a limit of two can return a comma as the last item.

Tested October 11, 2026 · v24.19.0 · 4 measured runs

Open the Claude text cleaner · Full measured data

Code-point comparison for Marker before comma

Measured inputs and outputs

These are locally constructed test strings, not evidence that Claude inserts these characters. We executed the saved homepage script snapshot with a minimal DOM harness and compared exact strings. The invisible-checkbox state and dash mode appear in each row. The observations below test this page's specific question. Destination observations run independently on the exact input and cleaned strings in the recorded Node runtime. We make no detector-score or statistical-watermark removal claim.

Before and after observations; full code points and strings are in the JSON download.
Fixture and modeInput string and code pointsOutput and cleaner statusObserved before / after
Marker before comma
direct string / keep / invisible true
"a​,b"
U+0061 U+200B U+002C U+0062
"a,b"
Removed 1 invisible character
{"literal":["a​","b"],"capturing":["a​",",","b"],"limited":["a​",","]}
{"literal":["a","b"],"capturing":["a",",","b"],"limited":["a",","]}
Plain comma
direct string / keep / invisible true
"a,b"
U+0061 U+002C U+0062
"a,b"
No selected invisible characters found
{"literal":["a","b"],"capturing":["a",",","b"],"limited":["a",","]}
{"literal":["a","b"],"capturing":["a",",","b"],"limited":["a",","]}
Adjacent commas
direct string / keep / invisible true
"a,,b"
U+0061 U+002C U+002C U+0062
"a,,b"
No selected invisible characters found
{"literal":["a","","b"],"capturing":["a",",","",",","b"],"limited":["a",","]}
{"literal":["a","","b"],"capturing":["a",",","",",","b"],"limited":["a",","]}
Quoted comma
direct string / keep / invisible true
"\"a,b\",c"
U+0022 U+0061 U+002C U+0062 U+0022 U+002C U+0063
"\"a,b\",c"
No selected invisible characters found
{"literal":["\"a","b\"","c"],"capturing":["\"a",",","b\"",",","c"],"limited":["\"a",","]}
{"literal":["\"a","b\"","c"],"capturing":["\"a",",","b\"",",","c"],"limited":["\"a",","]}

The extra item comes from the separator expression

The marked a-comma-b fixture has two values with a literal comma split. With a capturing regular-expression separator, the comma becomes a third array item between them. Cleaning changes the first value from marked a to a but leaves both output shapes intact. A limit of two returns a and the captured comma, without b. The plain reference shows the same rule without any marker. Adjacent commas create an empty value plus additional captured separators. The quoted-comma row is also split at its internal comma by both operations. The arrays are recorded in full so count changes and literal separator items remain visible.

String splitting does not implement the CSV grammar

Our observers call String.split with a literal comma, a capturing regular expression and that expression with a numeric result limit. No CSV parser runs. The earlier quoted-field guide uses a format-aware parser and addresses an entirely different contract; this fixture deliberately shows that quotes receive no special protection from these split calls. The cleaner does not change capturing groups, convert a regular expression into a string separator or validate a quoted field. We also do not test zero-width regular-expression matches, undefined capture groups or a custom Symbol.split implementation. These distinctions keep the recorded array behavior separate from claims about an importer’s actual format support.

Inspect the splitting rule before removing more text

Keep the exact separator and limit used by the destination. If separators appearing as result items are unwanted, review whether the pattern captures them and whether the application needs those captures. If the data is quoted CSV, use its parser rather than trying to make a generic split succeed by deleting punctuation. A selected-marker cleanup affects content within a resulting value, not the structure of the splitting algorithm. The four authored inputs demonstrate captured insertion, truncation by a result limit and quoted-text limitations. They do not establish a lossless CSV transformation, infer intended field counts or justify suppressing empty values in production data.

Reproduce this test

Save reproduce.cjs and tested-app.js in the same folder. Run the command below with Node.js. The harness prints its runtime, script SHA-256 and every measured row. Compare those rows with the original record. Using a newer script or runtime creates a new experiment; retain the version information with your rerun.

node reproduce.cjs

Reference and next check

ECMAScript string operations provides the relevant primary definition. The table and fixture analysis are original measurements. For broader inspection, use our Unicode inspector. Read the scope distinction before interpreting cleanup as a watermark result.