Код: Выделить всё
stuff I want to keep
[i]@if includesDownloadables[/i]
This is some stuff I want to replace on a certain condition.
[i]@endif includesDownloadables[/i]
More stuff to keep
[i]@if instantDownload[/i]
More stuff that is conditional.
[i]@endif instantDownload[/i]
More stuff to keep
Код: Выделить всё
string condition = "includesDownloadables";
string pattern = @"
Подробнее здесь: [url]https://stackoverflow.com/questions/76589712/regex-match-between-specific-tags[/url]
Мобильная версия