Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 01:32 PM   #1
Ilcaa
Junior Member
Ilcaa began at the beginning.
 
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>
my regex is
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
Ilcaa is offline   Reply With Quote
Old Yesterday, 01:59 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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
theducks is offline   Reply With Quote
Advert
Old Yesterday, 03:20 PM   #3
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
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.
Karellen is online now   Reply With Quote
Old Yesterday, 06:57 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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
Quote:
Originally Posted by theducks View Post
K I S S
Use diaps toolbag plugin. It does proper matching of nested opening and closing tags
Preferences: Getplugins: Diaps Editing Toolbag
Better to now use Otter's Editing Toolbag as it does the same thing and more. It's the new version.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 03:01 AM.


MobileRead.com is a privately owned, operated and funded community.