|
|
#1 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Dec 2011
Device: Nook
|
help with a Find regex
here is my html
Code:
<p class="c8">
<span class="c3">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is .</span>
</p>
Code:
/<span[^>]*>(.*?)<\/span>/g if i use a regex tester online it work, https://regex101.com/r/cqkkT1/1 I am trying to find the text within the span, i will eventually remove the span and place the text in the parent p-tag. in calibre it doesnt find the text, "no matches were found". any help? thanks |
|
|
|
|
|
#2 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,998
Karma: 65700000
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
K I S S
Use diaps toolbag plugin. It does proper matching of nested opening and closing tags Preferences: Getplugins: Diaps Editing Toolbag |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,911
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Ensure you have set the search Mode to Regex.
This might work better... Find... <p class="c8">\s+<span class="c3">(.*?)</span>\s+</p> Replace... <p class="c8">\1</p> Assuming the classes are static. |
|
|
|
|
|
#4 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,236
Karma: 154365101
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New to regex find and replace! | ksimpson1986 | Sigil | 2 | 11-06-2016 11:29 AM |
| regex cannot find to replace | eschwartz | Editor | 11 | 02-03-2014 11:00 PM |
| Regex find and replace | SanatyrZeo | Sigil | 5 | 10-29-2012 07:03 AM |
| RegEx find and replace | iblesq | Sigil | 1 | 01-10-2011 09:26 PM |
| REGEX find and replace help please | potestus | Sigil | 13 | 09-18-2010 04:14 PM |