I am doing a range replace with the characters in sr. How do I refer back to the grouping in the replace. For example, if the found string is &pa I want to replace it with a. If it is &pd, I want to replace it with d.
Aspose.Words.Document doc = new Aspose.Words.Document(textBox1.Text);
String sr = @"&p\s*([a-z])";
Regex rg = new Regex(sr);
doc.Range.Replace(rg,);