Use the option parameter RegexOptions.Multiline.
string output = Regex.Replace(input, pattern, string.Empty, RegexOptions.Multiline);
Full example
string input = @"this is some stuff right here
/* blah blah blah
blah blah blah
blah blah blah */ and this is more stuff
right here.";
string pattern = @"/[*][\w\d\s]+[*]/";
string output = Regex.Replace(input, pattern, string.Empty, RegexOptions.Multiline);
Console.WriteLine(output);
source
share