正则表达式嵌套html c,正则表达式在C中嵌套从UL UL#

我在我的HTML中有一个嵌套的UL,LI列表。我怎样才能从ul到ul节点的末尾获得正则表达式。在这个例子中,我需要获得2场比赛。正则表达式在C中嵌套从UL UL#

第一个应该是

  • This is First List
  • This is Second List
    • This is Second UL First List
    • This is Second UL Second List
  • This is Third List

,第二个应该是

  • This is Next List
    • This is Test
  • This is Third List
    • This is Test

我的HTML代码:

This is First Paragraph

  • This is First List
  • This is Second List
    • This is Second UL First List
    • This is Second UL Second List
  • This is Third List

This is Second Paragraph

  • This is Next List
    • This is Test
  • This is Third List
    • This is Test

+1

不要使用正则表达式来解析HTML。请参阅:http://stackoverflow.com/a/1732454/4664094 –

+1

[必备链接](http://stackoverflow.com/a/1732454/2307070) –

+1

您可以尝试HTML Agility Pack(https://htmlagilitypack.codeplex .COM)。正如以前的海报所指出的,不使用RegEx。 –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值