正则表达式 - ruby 怎么进行对称匹配?
巴扎黑
巴扎黑 2017-04-24 09:11:31
0
2
543

比如html代码中有嵌套的table元素,要去到外层和内层的table的outerHtml。这需要进行正则的嵌套匹配。html代码如下:




这是两个嵌套的table,使用正则式:
巴扎黑
巴扎黑

reply all (2)
黄舟

I don’t understand what you are talking about. xpath maybe you can use.

    伊谢尔伦

    If you want to parse xml or html, consider using nokogiri. However, I really don't understand your question very clearly.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!