Spectrum Network Configuration Manager (NCM) flags configuration changes on Fortinet or similar devices when encrypted private keys or certificates are re-hashed during captures. Despite using valid multiline regular expressions, NCM identifies these blocks as changes.
Spectrum NCM comparison masks are applied on a line-by-line basis during the getDiff process. NCM does not support multiline or block-level regex matching. Therefore, a regex intended to match a block from a start tag to an end tag will fail to mask the individual lines within that block.
To ignore the changing lines within a private key or certificate block, use a regex that identifies the specific character patterns found on each individual line.
^[A-Za-z0-9+/]{20,}={0,2}$