|
|
#1 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2026
Device: none
|
Replacing text in Sigil
Hi, I know there must be an easy way do do this, i want to replace the following
example: <p class="class_s9h">sample text sample text</p> replace with <p class="text"><i class="italic">sample text sample text</i></p> I want to keep the original text but change the "class" what do I put in the find/replace field Thanks in advance!
|
|
|
|
|
|
#2 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,826
Karma: 9501034
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Find
<p class="class_s9h">(.*?)</p> Replace <p class="text"><i class="italic">\1</i></p> |
|
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2026
Device: none
|
thanks, but ive tried that in sigil and it wont work. =(
|
|
|
|
|
|
#4 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2026
Device: none
|
|
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,826
Karma: 9501034
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
I thought Sigil used the same flavour of Regex. Maybe a wrong setting in Sigil?
|
|
|
|
|
|
#6 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 83,491
Karma: 153646249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
[
Quote:
Code:
font-style: italic; |
|
|
|
|
|
|
#7 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
|
|
|
|
|
#8 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,780
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
|
|
|
|
|
#9 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 83,491
Karma: 153646249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
|
|
#10 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,668
Karma: 6774048
Join Date: Nov 2009
Device: many
|
Yes, if that search did not work, then the user did not set the search to regex mode. Just tried a similar regex in Sigil and it works like a charm.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Replacing text in Sigil | Davvy123 | Sigil | 4 | 10-03-2018 12:53 PM |
| Replacing / with correct text | ghostyjack | Workshop | 2 | 09-11-2013 10:35 AM |
| Sigil: How to highlight text ? | Frank's | Sigil | 65 | 12-27-2012 07:37 PM |
| text problems Sigil? | ralphiedee | Sigil | 14 | 08-09-2012 04:30 AM |
| Replacing code without replacing text? | ElMiko | Sigil | 6 | 11-30-2011 08:14 PM |