FindReplaceOptions.useSubstitutions property. Gets or sets a boolean value indicating whether to recognize and use substitutions within replacement patterns...replace(regex, @"$3 bought a $2 from $1", options); Assert.AreEqual(..." : "$3 bought a $2 from $1.\r$3 bought a $2 from $1.", doc.getText()...