CLAUDE WATERMARK REMOVER · DESTINATION TEST
How can I obtain a cleaned match range without guessing its endpoint?
The measured d-flag regex reports the match range [1, 3]; the same expression without d has no indices property.
What the test establishes
The marker originally lies between A and B. Removing it makes BC begin at index one and end before index three. The indices result records that half-open range directly. A destination highlighter can use this range in the cleaned string, but must keep a separate mapping if it needs to highlight the corresponding original text where the marker still occupied a position.
Reproduce the observation
Save tested-app.js and reproduce.cjs together, then run node reproduce.cjs. Compare its output with the recorded observation. The harness executes the actual homepage callback in a minimal DOM and records its resulting field values and method calls. Destination operations run in Node.js; the homepage DOM is a controlled substitute. Runtime: v24.22.1. No submitted text or genuine Claude output is used.
{
"cleaned": "ABC",
"range": [
1,
3
],
"withoutIndices": "undefined"
}Capability boundary
Offsets use UTF-16 units and refer to the cleaned value. This fixture does not test DOM ranges or grapheme positions and does not reproduce the existing matchAll enumeration case.
This Claude watermark remover edits a small selected character set. These callback observations do not establish authorship, detector scores, statistical-watermark removal or end-to-end browser behavior. For real work, keep the original and compare the exact result at its destination.
Primary material and next step
The tested first-party source snapshot and complete harness are the primary material for this page. For broader scope, read invisible Unicode versus AI watermarks, or return to the cleaner.