【问题标题】:Regex for Parsing HTML NewLine用于解析 HTML 换行符的正则表达式
【发布时间】:2015-10-11 20:28:28
【问题描述】:
<tr><th>Biography</th>
<td>   A bunch of random info here   <td>

我正在尝试获取传记行和开头之后的所有内容 下一行的标签。如果换行符不在括号中: (?

【问题讨论】:

标签: c# html regex


【解决方案1】:

Never parse HTML with regex !

使用适当解析器的解决方案:

$ saxon-lint --html --xpath '//*[.="Biography"]/../td/text()' file
A bunch of random info here 

查看https://github.com/sputnick-dev/saxon-lint

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-11
    • 2022-01-25
    • 2020-03-14
    • 1970-01-01
    • 2014-05-16
    • 2011-06-11
    • 2010-09-08
    相关资源
    最近更新 更多