I have an html file which has a part like this:
<li>
<a href="../index.html" name="" title="title1">title1</a>
</li>
<li>
<a href="level1/level1.html" name="" title="title2">title2</a>
</li>
<li>
<a href="levl1/level2/level2.html" name="" title="title3">title3</a>
</li>
I want them to look like this:
<li>
<a href="../" name="" title="title1">title1</a>
</li>
<li>
<a href="level1/" name="" title="title2">title2</a>
</li>
<li>
<a href="level1/level2/" name="" title="title3">title3</a>
</li>
I wrote a script in powershell to manipulate these href links which look like this:
(Get-Content $i) -replace '/*.html', '/' | Set-Content $i
But somehow the output is not coming as expected. Any idea what am I doing wrong?