Quote:
Originally Posted by Thom*
If I understand correctly, you could try this.
In the search window, make sure that "regex" and "current file" are selected.
Search for:
<p class="calibre2"><sup class="calibre3">(.*?)</sup>
Replace with:
<p id="id_v300100\1" class="calibre1"><sup class="calibre2">\1</sup>
Run this for chapter 1.
Change id_v3001 to "id_v3002" in the replace string.
Run this for chapter 2.
etc.
With the info you provided I don't see any alternative but to run this once for each chapter.
I haven't tested this, but it should work.
|
***************
Thanks for your answer. Only that there is a problem.
from 1 to 9 the result is:
<p id="v3001001" class="calibre1"><sup class="calibre2">\1</sup>
from 10 to 99 the result is:
<p id="v30010099" class="calibre1"><sup class="calibre2">\1</sup>
from 100 to 999 the result is:
<p id="v300100999" class="calibre1"><sup class="calibre2">\1</sup>
I need an id of only 7 numbers.
There are 8 numbers in case of 99, and there are 9 numbers in case of 999.
Has anyone else another idea to change ALL the chapters with ONE regular expression?