Cool Anime Cool Anime - 5 months ago 16
HTML Question

notepad++ regex replace same number 00 with 01, 02 03 etc

hi


sorry I dont know how to be more specific asking my question, I have
a file wich goes like this


<li onclick="tab.location.href='http://stackoverflow.com'" style="text-align: center;"><b>ep 00</b></li>

<li onclick="tab.location.href='http://stackoverflow.com/'" style="text-align: center;"><b>ep 00</b></li>

<li onclick="tab.location.href='http://stackoverflow.com/'" style="text-align: center;"><b>ep 00</b></li>


I want to use regex in notepad++ to make it like this :

<li onclick="tab.location.href='http://stackoverflow.com'" style="text-align: center;"><b>ep 00</b></li>

<li onclick="tab.location.href='http://stackoverflow.com/'" style="text-align: center;"><b>ep 01</b></li>

<li onclick="tab.location.href='http://stackoverflow.com/'" style="text-align: center;"><b>ep 02</b></li>


i want to change "ep 00" inside the tag to be ep 01, ep 02, ep 03 ... ep 711 etc ....

thanks and forgive my bad english ... this is my first question

Answer

as said before on the comments. Regex is not able of such task ... you can do though using a calc program ... OpenOffice Calc LibreOffice Calc BrOffice.org Calc Microsoft Office Excell you just need to something like this

or the js solution

var holderelement=document.body;
var howmanylinksyouwant=3;
for (var i=0;i<howmanylinksyouwant;i++){
var li=document.createElement("li");
li.onclick=function(){location.href="stackoverflow.com";}
li.style.textAlign="center";
li.innerHTML="<b>ep "+i+"</b>" holderelement.append(li);
}