Мне нужно заменить:Regex заменить не заменяет следующий
string full = <para number="3.">Rule 33.12 of the Federal Court Rules 2011(“FCR”) regulates the practice and procedure to be followed with respect to appeals from the Tribunal. It relevantly provides:</para><item>(2) The notice of appeal must state: </item><item>(a) the part of the decision the applicant appeals from or contends should be varied; and </item><item>(b) the precise question or questions of law to be raised on the appeal; and </item><item>(c) any findings of fact that the Court is asked to make; and </item><item>(d) the relief sought instead of the decision appealed from, or the variation of the decision that is sought; and </item><item>(e) briefly but specifically, the grounds relied on in support of the relief or variation sought. </item><item>Note: The Court can only make findings of fact in limited circumstances—see section 44(7) of the AAT Act. </item><para number="4.">
с этим:
string full = <para number="3.">Rule 33.12 of the Federal Court Rules 2011 (“FCR”) regulates the practice and procedure to be followed with respect to appeals from the Tribunal. It relevantly provides:<quote><para>(2) The notice of appeal must state: <list><item>(a) the part of the decision the applicant appeals from or contends should be varied; and </item><item>(b) the precise question or questions of law to be raised on the appeal; and </item><item>(c) any findings of fact that the Court is asked to make; and </item><item>(d) the relief sought instead of the decision appealed from, or the variation of the decision that is sought; and </item><item>(e) briefly but specifically, the grounds relied on in support of the relief or variation sought. </item><item>Note: The Court can only make findings of fact in limited circumstances—see section 44(7) of the AAT Act. </item></list></quote></para><para number="4.">
Я использую этот код:
line = Regex.Replace(line, full, fullNew);
переменная строка содержит целое xml-файл.
Пожалуйста, помогите. Нужно это плохо.
Кажется, что вам нужно string.replace вместо regex.replace, лучше XML-парсер. –
Можете ли вы показать мне, как использовать замену строки? –
извините. это сработало. –