majorgrumpy
New Member
Input is of the format shown below : \[code\]<HiddenRowGroups> <HiddenGroup> <From>16</From> <To>17</To> <Level>0</Level> <GroupName>TABS</GroupName> <ItemTotalHeader>Total</ItemTotalHeader> </HiddenGroup> <HiddenGroup> <From>3</From> <To>3</To> <Level>0</Level> <GroupName>ABSCDXH</GroupName> <ItemTotalHeader>Total</ItemTotalHeader> </HiddenGroup> </HiddenRowGroups>\[/code\]Desired Output : \[code\]<HiddenRowGroups />\[/code\]How to replace the regex which is in form of a string to \[code\]<HiddenRowGroups />\[/code\] . I tried replacing it via \[code\]Regex.Replace\[/code\] method of C#.