Test a regex on a small copy, highlighting matches before enabling replacement. Include examples that should match and close-looking examples that must not. Add boundaries or anchors when the pattern catches too much.
Review a diff after replacing and keep the original for rollback. Unicode, line endings, and multiline text can change behavior, so sample those cases when relevant. Never run a broad replacement across important data based on one successful example.
What exact text should change and what must stay untouched?