The match includes one or more special or break characters and cannot be replaced

I have this code,but there is an error
“NotSupportedException The
match includes one or more special or break characters and cannot be replaced.”

There is an error in regular expressions?
I want to get all characters do not include return

foreach(Aspose.Words.Paragraph p in doc.Sections[0].Body.Paragraphs)
{
    p.Range.Replace(@"(?s).*", "fa");
}

I want to replace special characters(.) in the paragraph,for example:
The source:“This /is /word/ 1/1,a/a this is”
The target: “This /is /word/ 1.1,a/a this is”

but use this code, no error

string pattern = @"(?s).*";
string text = "The threaded application ate up the thread pool as it executed.\r";
MatchCollection matches;
Regex defaultRegex = new Regex(pattern);
// Get matches of pattern in text
matches = defaultRegex.Matches(text);
string pattern = @"(?s).";
string text = "The threaded application ate up the thread pool as it executed.\r";
MatchCollection matches;
Regex defaultRegex = new Regex(pattern);
// Get matches of pattern in text
matches = defaultRegex.Matches(text);

Hi,

Thanks for your inquiry. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-8331 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi there,

On further investigation our development team came to know that they won’t be able to implement the fix to your issue. Your issue will be closed with ‘‘Won’t Fix’’ resolution.

The reason of the issue is that the following line of text contains the \r. Please modify the regex pattern to avoid such issue.

The reason of the issue is that following line of text contains the \r

Moreover, you can use the Document.Range.Replace to replace special character e.g ‘.’. Hope this helps you. If you still face problem, please manually create your input and expected output Word document using Microsoft Word and attach it here for our reference. We will investigate, how you want your final Word output be generated like. We will then provide you more information on this along with code.