I have a MS Word .docx document that contains a placeholder for a number: (underscore)balance(underscore).
I'm trying to replace the placeholder with a decimal value using the code below suggested by Microsoft. Here's the problem: if the number is zero (0), the placeholder becomes "(underscore)balance(underscore).00". If the number is >= 1, let's say 20, then the substitution is correct, e.g. I'll get $20.00 in the document. If I change the culture to "fr-CA" then the substitution is correct no matter the number. So, it seems the problem boils down to regex not being able to handle a substitution with text that resembles a dollar sign-zero combination like e.g. "$0.10". So, is this a regex bug or a feature? Can anyone replicate it? Any way around it? Thanks.

```
private void ProcessDocument(string document)
    {
        CultureInfo culture = new CultureInfo("en-US");

        using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(document, true))
        {
            string docText = null;
            using (StreamReader sr = new StreamReader(wordDoc.MainDocumentPart.GetStream()))
            {
                docText = sr.ReadToEnd();
            }

            decimal bal = 0;

            // instead of replacing the "_balance_" placeholder with "$0.00" as expected
            // the following gives "_balance_.00" 
            Regex regexText = new Regex("_balance_");
            docText = regexText.Replace(docText, bal.ToString("C2", culture));

            // save to stream
            using (StreamWriter sw = new StreamWriter(wordDoc.MainDocumentPart.GetStream(FileMode.Create)))
            {
                sw.Write(docText);
            }
        }
    }

```