Hi to all.
My input is
I copy the word after "toc-" like intro and ack.
But in the 3rd case I just copy the number after toc-ch.
My code with the find is:
And my replacement code is
for replacing this code in file
Please reply those codes are correct or not.
My input is
Code: Select all
<a id="toc-intro" href="@@@.html#intro">
<a id="toc-ack" href="@@@.html#ack">
<a id="toc-ch1" href="@@@.html#ch1">
But in the 3rd case I just copy the number after toc-ch.
My code with the find is:
Code: Select all
UltraEdit.perlReOn();
UltraEdit.activeDocument.findReplace.matchCase=true;
UltraEdit.activeDocument.findReplace.regExp=true;
UltraEdit.activeDocument.findReplace.searchDown=true;
UltraEdit.activeDocument.findReplace.preserveCase=false;
UltraEdit.activeDocument.findReplace.find("id=\"(toc-chapter|toc-ch|toc-part|toc-pt|toc-)");
UltraEdit.clipboardContent = UltraEdit.activeDocument.findReplace.find("([^<>\"\r\n]*?)(?=\")");
var nSec = UltraEdit.activeDocument.copy(UltraEdit.clipboardContent);
Code: Select all
UltraEdit.activeDocument.findReplace.replace("@@",nSec);
Code: Select all
<a id="sec@@-##" href="@@@.html#sec@@_##">