这段文字:
<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.
我想使用正则表达式在Permits的结尾插入</a>
。恰好,我所有类似的HTML /文本块中已经包含了换行符。我认为我需要找到一个包含(或以<li><a href="#">
开头的)行并且有一个换行符\n
。