03-23-2024, 02:09 PM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Mar 2024
Device: none
|
How do I remove this type of tag?
Example:
Code:
<span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.2.1"> キン、と</span> Code:
キン、と I don't know what regex to use for this like pattern... Could you help me? |
03-23-2024, 02:32 PM | #2 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Using the TagMechanic plugin might be the easiest way.
But those span tags do not hurt anything and they really do not need to be removed at all. Why are you trying to remove them? They were placed there in the kobo version of that book for a reason. |
03-23-2024, 03:02 PM | #3 | |
Resident Curmudgeon
Posts: 76,465
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
The other solution is to download them as ePub from Kobo you won't have the Kobo code to remove. |
|
03-23-2024, 03:06 PM | #4 |
Junior Member
Posts: 2
Karma: 10
Join Date: Mar 2024
Device: none
|
|
03-23-2024, 03:38 PM | #5 | |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
They asked in a Sigil Forum, there are ways to do it with Sigil, so start with a Sigil solution or stay out of the conversation. |
|
03-23-2024, 03:40 PM | #6 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
03-23-2024, 05:15 PM | #7 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
@vleaf0210
As explained, when tags are nested like spans can be, regex can get confused. That is why I tried to suggest using the TagMechanic plugin may be easier. I assumed you have a basic understanding of how to find, install, and use Sigil plugins. If not, our Sigil User Guide may help. if you still want to try with regex, others in the regex thread can certainly provide some help. |
03-23-2024, 06:29 PM | #8 |
Bibliophagist
Posts: 40,573
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
You could use regex to remove those spans however TagMechanic is a safer solution since it handles nested spans. I would suggest installing TagMechanic, selecting the files you want to remove those spans from and then running TagMechanic. Select the action as delete, the tag name as span, the attribute as class and the Whose value is field as koboSpan. Click on process and then commit and exit. Note that some books will not have the class= and you could try using the id attribute instead. That will require setting the Whose value is field using a regex such as 'kobo\.\d+\.\d+' without the quotes (basically matching any string of the format kobo.number(s).number(s) )
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to remove a 'p' tag with a condition on an inner 'a' tag ? | Villard | Recipes | 2 | 01-07-2024 09:25 AM |
Tag Editor vs search as you type | Anyssia | Library Management | 6 | 02-06-2022 11:37 AM |
Tag Mapper: Remove tag if another specific tag exists? | ownedbycats | Library Management | 2 | 07-23-2020 11:32 PM |
Wondering if there is a way to remove end tag with beginning tag | LadyKate | Editor | 5 | 06-29-2016 05:32 PM |
Composite column problem combining two tag type columns | At_Libitum | Recipes | 1 | 08-29-2013 01:31 PM |