I'm performing maintenance on a system that has hundreds of links on one page as follows:
<li> Revista alvo <a href="http://exemplo.com"> http://exemplo.com </a> </li>
Note that there is text outside the a
tag. What I want to do, put this text inside the a
tag with your supposed href, the example above would look like this:
<li> <a href="http://exemplo.com"> Revista alvo </a> </li>
I'm doing this change in hand but there are hundreds and hundreds of links, which makes the task tiring. Does anyone have any idea how I can script to do this? It can be in any language, PHP
,JS
etc.
</div>