Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-10-2013, 11:52 PM   #1
phossler
Addict
phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 268
Karma: 50154
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
RegEx to change but not all

Converted a MOBI to EPUB in Calibre and there's a gizillion of these that generate a validation error ('no character data is allowed by content model')

Code:
<blockquote>
text text text  text text text 
</blockquote>
but also some that have that<p> tags

Code:
<blockquote>
<p>
text text text
</p>
</blockquote>

The regex's I've tried so far have been spectacularly unsuccessful

Could some regex guru help with the S/R to fix the first, but not mess up the second?

Paul

Last edited by phossler; 01-10-2013 at 11:53 PM. Reason: RegEx to change SOME but not all
phossler is offline   Reply With Quote
Old 01-11-2013, 07:08 AM   #2
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,869
Karma: 4630362
Join Date: Dec 2010
Device: Kindle PW2
The following quick & dirty regex should work:

Find: <blockquote>\s+([^<]+)\s+</blockquote>
Replace: <blockquote>\n<p>\1</p>\n</blockquote>
Doitsu is offline   Reply With Quote
Old 01-11-2013, 09:30 AM   #3
phossler
Addict
phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!phossler is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 268
Karma: 50154
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: kindle
Thanks --

I'm tracing my way through it to make sure I understand (and learn)

I usually have the most difficulty with multiple lines and whitespace

Paul
phossler is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to change Calibre-Server.exe to change to a service for Windows roadrunnerm Calibre 1 10-19-2012 06:44 PM
RegEx Help ghostyjack Workshop 4 03-22-2012 09:24 AM
Regex Gunnerp245 Conversion 5 03-05-2012 04:15 PM
RegEx el.motar Sigil 10 12-12-2011 05:54 PM
Break on POV change also, or only on Scene Change? Steven Lake Writers' Corner 2 11-27-2010 08:44 PM


All times are GMT -4. The time now is 03:29 PM.


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