Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-08-2011, 10:43 AM   #1
littleezza
Junior Member
littleezza began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2011
Device: Kobo
Regular Expressions

Hi,

I use Calibre to convert my books. When I first started using it I kept getting .....<b.*?>\s*Generated\s+by\s+ABC\s+Amber\s+LIT.* ?</b>..... in some of my books. I worked out how to get rid of that one by using the regular expressions and highlighting the <b and </b> strings but I have two other ones I can't get rid of.

">ABC Amber LIT Converter http://www.processtext.com/abclit.html ABC Amber LIT Converter http://www.processtext.com/abclit.htm

and

Create PDF with GO2PDF for free, if you wish to remove this line, click here to buy Virtual PDF Printer</a></p>

I can't figure out how to get rid of them. The creat pdf one should work because it shas the <p and </p> strings but it won't.

The ABC Amber one has no strings so have no idea how to get rid of them.

Please someone help.

Sorry if this has been asked before.

Thanks

Last edited by littleezza; 07-10-2011 at 05:56 AM.
littleezza is offline   Reply With Quote
Old 07-15-2011, 12:52 PM   #2
therealjoeblow
Zealot
therealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfolded
 
Posts: 106
Karma: 52102
Join Date: Jun 2010
Device: Samsung Android Tablet w/Moon+ Pro Reader
Here's a good regex reference:

http://www.regular-expressions.info/reference.html

In regular expressions, the following are "special" characters that need to be dealt with in a particular manner:

[\^$.|?*+()

To search for any of these, you need to put \ in front of them to supress their special meaning.

With your string as follows:

Code:
">ABC Amber LIT Converter http://www.processtext.com/abclit.html ABC Amber LIT Converter http://www.processtext.com/abclit.htm
...you can try searching with the following regex:

Code:
"&gt;ABC Amber LIT Converter http://www\.processtext\.com/abclit\.html ABC Amber LIT Converter http://www\.processtext\.com/abclit\.htm
...that should find what you're looking for. Note the \ character in front of the . to search for the period itself. Also note, in the simple .html file I created to test it, calibre converted the "> to "&gt; when generating the code in the regex wizard/tester - you might need to fiddle with that part a bit depending on your actual source, it might be a bit different if it's not a .html input file.

Cheers
The REAL Joe

Last edited by therealjoeblow; 07-15-2011 at 12:55 PM.
therealjoeblow is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another help with regular expressions encapuchado Library Management 6 06-21-2011 04:14 PM
Help with regular expressions jevonbrady Library Management 6 06-21-2011 11:16 AM
An introduction to regular expressions Manichean Conversion 0 01-26-2011 06:05 PM
Help with Regular Expressions ghostyjack Workshop 2 01-08-2010 12:04 PM
BookDesigner v5 and regular expressions ShineOn Sony Reader 11 08-25-2008 05:06 PM


All times are GMT -4. The time now is 05:14 PM.


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