In a list of HTML links like this, I'd like to replace all "\" inside the link with "/", but not inside any link text. I'm close, but there is something wrong with my looping.
before:
<a href="\html\constrbot.html">Link text to this page</a>
<a href="\html\consumer.html">Another link text</a>
<a href="\html\contact.html">More link text but with this character \ </a>
<a href="\html\croton.html">Also has the \ character</a>
desired result:
<a href="/html/constrbot.html">Link text to this page</a>
<a href="/html/consumer.html">Another link text</a>
<a href="/html/contact.html">More link text but with this character \</a>
<a href="/html/croton.html">Also has the \ character</a>
This script works for the first occurence, but then stops, and repeating the macro again selects the first line field (now corrected) and alerts "Search string not found!"
InsertMode
ColumnModeOff
HexOff
UnixReOff
Top
Loop
Find RegExp "href[~>]+"
IfFound
StartSelect
Find "\"
Replace All SelectText "/"
EndSelect
Else
ExitLoop
EndIf
EndLoop
Top
before:
<a href="\html\constrbot.html">Link text to this page</a>
<a href="\html\consumer.html">Another link text</a>
<a href="\html\contact.html">More link text but with this character \ </a>
<a href="\html\croton.html">Also has the \ character</a>
desired result:
<a href="/html/constrbot.html">Link text to this page</a>
<a href="/html/consumer.html">Another link text</a>
<a href="/html/contact.html">More link text but with this character \</a>
<a href="/html/croton.html">Also has the \ character</a>
This script works for the first occurence, but then stops, and repeating the macro again selects the first line field (now corrected) and alerts "Search string not found!"
InsertMode
ColumnModeOff
HexOff
UnixReOff
Top
Loop
Find RegExp "href[~>]+"
IfFound
StartSelect
Find "\"
Replace All SelectText "/"
EndSelect
Else
ExitLoop
EndIf
EndLoop
Top