CLAUDE WATERMARK REMOVER · DESTINATION TEST
Is an unmatched optional capture an empty string?
No. In this fixture the regex matches the cleaned value, but its optional second capture is undefined rather than an empty string.
What the test establishes
Cleanup yields A, which satisfies the overall expression. The optional B group does not participate. A destination that blindly calls a string method on that capture can fail despite a successful overall match. Decide whether absence should remain absent or become an explicit empty field before export.
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": "A",
"full": "A",
"first": "A",
"secondType": "undefined",
"secondIsEmpty": false
}Capability boundary
This example uses a non-global expression and one optional group. It does not retest global match array shapes or regex cursor state, which are documented separately.
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.