dataText = "Amount 20.25 is proccesed due to payment and amount 20.25 is processed due to payment as per source"
regexExp = new Regex("due to payment",RegexOptions.Multiline)
op = Regex.Replace(regexExp.Replace(dataText,"",regexExp.Matches(datatext).Count-1),"\s{2,}"," ")
Here regexExp is of the type System.Text.RegularExpressions.Regex, dataText and op are String type variables