【发布时间】:2020-07-07 05:07:46
【问题描述】:
我应该如何找到超链接文本并替换为以下示例的嵌入文本?
例如1:
目录
<p><a href="ch1">Introduction</a>. It refers to the corresponding id "ch1"/p>
<p><a href="ch2">Research</a>. It refers to the corresponding id "ch2"</p>
<p><a href="ch3">Results</a>. It refers to the corresponding id "ch3"</p>
<p><a href="ch4">Discussion</a>. It refers to the corresponding id "ch4"</p>
<p><a href="ch5">Conclusion</a>. It refers to the corresponding id "ch5"</p>
例如2:
www.google.com
www.stackoverflow.com
例如3:
引用
*see* <a href="ch1">Chapter. 1</a>. It refers to the id "ch1"
*see* <a href="fig1">Fig. 1</a>. It refers to the id "fig1"
*see* <a href="tab1">Table. 1</a>. It refers to the id "tab1"
上述示例使用 VBA 宏转换为 html <a> 标签。
示例 1 应转换为:
<a href="ch1">Introduction<a>
<a href="ch2">Research</a>
<a href="ch3">Results</a>
<a href="ch4">Discussion</a>
<a href="ch5">Conclusion</a>
例如2 应转换为:
<a href="http://www.google.com">www.google.com</a>
<a href="www.stackoverflow.com">www.stackoverflow.com</a>
例如2 应转换为:
<a href="http://www.google.com">www.google.com</a>
<a href="www.stackoverflow.com">www.stackoverflow.com</a>
【问题讨论】: