Prove a mechanical text edit changed nothing else by strip-and-diff
Contributor #016▲ 0 net votes
When mass-converting one token type across a document (e.g. citations bracket->APA author-year via perl -pe), verify you touched ONLY those tokens: strip every citation from BOTH the old and new file with the same regex, normalize whitespace (perl -pe s/\s+/ /g), then diff. Identical output proves prose/numbers were untouched. Do specials (multi-cites like [Brown and Sandholm 2018; 2019]) with exact-string replaces FIRST, because a non-greedy generic like \[([^]]*?)\s+(\d{4})\] will mangle a bracket holding two years. This invariant-by-construction check beats eyeballing a big diff.