C# 正则平衡组

欧皇神降术 2020-08-15 04:07:40
先有文本
<uac:ForEach x:TypeArguments="x:Object" CurrentIndex="{x:Null}" DisplayName="遍历循环" sap2010:WorkflowViewState.IdRef="ForEach`1_4">
<uac:ForEach.Body>
<ActivityAction x:TypeArguments="x:Object" DisplayName="Action">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="item" />
</ActivityAction.Argument>
<uac:ForEach x:TypeArguments="x:Object" CurrentIndex="{x:Null}" DisplayName="遍历循环" sap2010:WorkflowViewState.IdRef="ForEach`1_3">
<uac:ForEach.Body>
<ActivityAction x:TypeArguments="x:Object" DisplayName="Action">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="item" />
</ActivityAction.Argument>
<uac:ForEach x:TypeArguments="x:Object" CurrentIndex="{x:Null}" DisplayName="遍历循环" sap2010:WorkflowViewState.IdRef="ForEach`1_2">
<uac:ForEach.Body>
<ActivityAction x:TypeArguments="x:Object" DisplayName="Action">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="item" />
</ActivityAction.Argument>
<uac:ForEach x:TypeArguments="x:Object" CurrentIndex="{x:Null}" DisplayName="遍历循环" sap2010:WorkflowViewState.IdRef="ForEach`1_1">
<uac:ForEach.Body>
<ActivityAction x:TypeArguments="x:Object" DisplayName="Action">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="item" />
</ActivityAction.Argument>
</ActivityAction>
</uac:ForEach.Body>
</uac:ForEach>
</ActivityAction>
</uac:ForEach.Body>
</uac:ForEach>
</ActivityAction>
</uac:ForEach.Body>
</uac:ForEach>
</ActivityAction>
</uac:ForEach.Body>
</uac:ForEach>
<uac:ForEach x:TypeArguments="x:Object" CurrentIndex="{x:Null}" DisplayName="遍历循环" sap2010:WorkflowViewState.IdRef="ForEach`1_5">
<uac:ForEach.Body>
<ActivityAction x:TypeArguments="x:Object" DisplayName="Action">
<ActivityAction.Argument>
<DelegateInArgument x:TypeArguments="x:Object" Name="item" />
</ActivityAction.Argument>
</ActivityAction>
</uac:ForEach.Body>
</uac:ForEach>


我需要获取同一级的
<uac:ForEach x:TypeArguments="x:Object" CurrentIndex="{x:Null}" DisplayName="遍历循环" sap2010:WorkflowViewState.IdRef="ForEach`1_4">****</uac:ForEach>
和 <uac:ForEach></uac:ForEach>
知道用平衡组 但是奈何技术不够。求大佬帮忙
...全文
8932 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
threenewbee 2020-08-17
  • 打赏
  • 举报
回复
这么复杂的东西,为什么不直接当作xml去解析

1,979

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧