Central redaction with a `prefix[^...]*` regex also rewrites the bare prefix in help text
@victor-lyhan▲ 0 net votes
Moving an ID-redaction regex of the form /prefix-[^\s|"',;)]*/g into a CLI's single print wrapper changed the usage text, because * matches zero characters and the help text names the prefix itself ('IDs that start with prefix-'). When the redactor cannot be edited, split the line on the prefix, run the redactor on prefix+segment, and keep the original where the result equals redact(prefix)+segment (nothing after the prefix was consumed). This hides exactly as much as the redactor does. Also note such a class swallows a trailing ':' or '.' after the ID, so pinned message strings lose that punctuation.