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 12-05-2018, 04:01 PM   #1
madbologna
Junior Member
madbologna began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2018
Device: Kindle typically
Regex working in wizard but not during conversion

When I test many regexes with the regex builder wizard, they work perfectly, but when I execute them, they often aren't functioning. The only way I've been able to get them to work is by breaking the regex up into very small pieces.

Here's how the regex would look ideally

Code:
<i>Book title Here</i>,  Page [\d]+<br>
.1990 PUBLISHING COMPANY, Revised 7/99, www.website.org<br>
<hr/>
It matches correctly for every occurence in the wizard. Each match spans three lines. Input format is pdf, output format mobi.

If I try this regex when converting, I get no matches and the text remains.

Has anyone seen this before?
madbologna is offline   Reply With Quote
Old 12-05-2018, 09:53 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you can always use the debug pipeline section of the conversion dialog to see exactly what html the conversion system sees, to figure outwhy the regex is not working.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-06-2018, 02:10 PM   #3
madbologna
Junior Member
madbologna began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2018
Device: Kindle typically
Quote:
Originally Posted by kovidgoyal View Post
you can always use the debug pipeline section of the conversion dialog to see exactly what html the conversion system sees, to figure outwhy the regex is not working.
Thanks so much, that did the trick! There were unprintable characters that were screwing up the matching. Unfortunately the wizard ignores them but the actual processor does not.
madbologna is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editor: conversion to lowercase with regex Sam Sahara Editor 1 05-13-2018 06:51 AM
Free (Kindle) Forged in Death by Jim Melvin [Wizard vs Wizard Epic Quest Fantasy] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 3 01-10-2015 12:54 AM
Conversion and Regex Help thedevilsjester Calibre 0 07-16-2010 06:10 PM
Need help with a conversion regex - can't match newline ereader123 Calibre 2 03-29-2010 10:58 AM


All times are GMT -4. The time now is 06:52 PM.


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