View Single Post
Old 01-09-2021, 08:47 AM   #1
CarlosJavier
Junior Member
CarlosJavier began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2021
Device: Kindle
Help - Regex code to add parameter to a tag.

Good morning,
I am new in caliber, and when I did my first conversion from azw3 to epub,
the text appears in positions that do not correspond,

then investigating a little more in the code I have verified that it is missing to add a parameter to a label.

Code:
<span class="word si fs5" style="left: 518px; top: 613px; width: 165px; ">COU</span>
<span class="word si fs5" style="left: 697px; top: 613px; width: 149px; ">RSE</span>
<span class="word si fs6" style="left: 891px; top: 613px; width: 219px; ">BOOK</span>
What I need is to add the word "pos" after "word si", the result should look like this.

Code:
<span class="word si pos fs5" style="left: 518px; top: 613px; width: 165px; ">COU</span>
<span class="word si pos fs5" style="left: 697px; top: 613px; width: 149px; ">RSE</span>
<span class="word si pos fs6" style="left: 891px; top: 613px; width: 219px; ">BOOK</span>
In this way the absolute position of the left and top scrolling parameters will be respected, and the text will be scrolled to the correct position.

I started reading the regex examples, and the only thing I could do was this,
but I don't achieve the desired result.

search : word si([^f]+)
replace : \1pos

somebody please help me.

Greetings.
CarlosJavier is offline   Reply With Quote