FindUniqueByPattern not work when document contains break

Jun 25, 2016 at 10:09 AM
I want to get string between blocks like this:
$word$
this is some block of word.
this is some block of word
this is some block of word
$/word$
I use this code:
using (var docx = DocX.Load(@"d:\\a\\1.docx"))
            {
                var x = docx.FindUniqueByPattern(
                    Regex.Escape("$") + @"(.*?)" + Regex.Escape("$")
                    + @"(.*?(\n)*)" +
                    Regex.Escape("$") + @"(.*?)" + Regex.Escape("/$"), RegexOptions.Singleline);
            }
but it does not work.