<li><a href="#">Animal and Plant Health Inspection Service Permits
Provides information on the various permits that the Animal and Plant Health Inspection Service issues as well as online access for acquiring those permits.
Run Code Online (Sandbox Code Playgroud)
我想</a>
在Permits的末尾使用正则表达式.碰巧我所有类似的html/text块都已经有了换行符.我相信我需要找到\n
该行包含(或以其开头)的换行符<li><a href="#">
.
Nul*_*ion 29
你可以搜索:
<li><a href="#">[^\n]+
Run Code Online (Sandbox Code Playgroud)
并替换为:
$0</a>
Run Code Online (Sandbox Code Playgroud)
$0
整场比赛在哪里?确切的语义将取决于您使用的语言.
警告:您应该避免使用正则表达式解析HTML.这就是原因.