Zerowidth CleanerAll measured guides

CLAUDE WATERMARK REMOVER · PRACTICAL TEST

Can an anchored regex accept just one line of a cleaned value?

Yes. Our X, AB, Y multiline value passes /^AB$/m after cleanup, with the match at index 2, while /^AB$/ fails. The m flag changes anchor positions; a successful line match does not validate the whole value.

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

Open the Claude text cleaner · Full measured data

Code-point comparison for Marked middle line

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
Marked middle line
direct string / keep / invisible true
"X\nA​B\nY"
U+0058 U+000A U+0041 U+200B U+0042 U+000A U+0059
"X\nAB\nY"
Removed 1 invisible character
{"whole":false,"multiline":false,"matched":null,"index":null}
{"whole":false,"multiline":true,"matched":"AB","index":2}
Plain middle line
direct string / keep / invisible true
"X\nAB\nY"
U+0058 U+000A U+0041 U+0042 U+000A U+0059
"X\nAB\nY"
No selected invisible characters found
{"whole":false,"multiline":true,"matched":"AB","index":2}
{"whole":false,"multiline":true,"matched":"AB","index":2}
Whole value
direct string / keep / invisible true
"AB"
U+0041 U+0042
"AB"
No selected invisible characters found
{"whole":true,"multiline":true,"matched":"AB","index":0}
{"whole":true,"multiline":true,"matched":"AB","index":0}
Wrong line
direct string / keep / invisible true
"X\nAC\nY"
U+0058 U+000A U+0041 U+0043 U+000A U+0059
"X\nAC\nY"
No selected invisible characters found
{"whole":false,"multiline":false,"matched":null,"index":null}
{"whole":false,"multiline":false,"matched":null,"index":null}

The matching line occupies only part of the string

The marked fixture has three lines and a selected U+200B between A and B on the middle one. Both expressions initially fail. Removing that marker enables the multiline expression to match AB at index two, while the expression without m still fails. The plain middle-line control produces the same partial acceptance before any cleaning. The whole-value AB control passes both expressions at index zero. The wrong-line AC control passes neither. We retain match text and index as well as booleans because an accepted test alone hides how much input was actually examined. The surrounding X and Y remain in the cleaned string; the cleaner does not delete either line.

Anchor behavior is independent of dotAll and cursor state

Our earlier dotAll matrix asks whether a dot consumes line terminators and how Unicode mode changes its width. This matrix has no dot, global flag or mutable lastIndex. It asks where the start and end assertions may succeed when m is enabled. Each call uses a newly authored literal and the same exact source value. The four controls concern LF-separated text in the saved Node runtime. We do not test every terminator, CRLF pair, final-line exception or a browser pattern attribute. A match at zero is also insufficient by itself to prove full coverage in an arbitrary expression; this experiment records zero only for the explicitly selected whole-value control.

Separate line search from field validation

Decide whether the destination wants any matching line or a complete permitted value before choosing flags. If the application expects one field, preserve and inspect the full string instead of treating a successful multiline test as its schema. If line search is intended, retain the match location so the result can be explained. Character cleanup may make a line match newly possible while leaving all surrounding content intact. Our fixture is not a production validator, a security bypass demonstration or evidence of a Claude formatting habit. The downloadable script reproduces both flag choices on invented strings, making the narrower acceptance change auditable without claiming that all anchored expressions enforce the same boundary.

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.