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 07-23-2017, 05:24 PM   #526
Steadyhands
Connoisseur
Steadyhands began at the beginning.
 
Steadyhands's Avatar
 
Posts: 55
Karma: 10
Join Date: Dec 2011
Device: Samsung Tablet
I'm looking to correct some scan errors for the letter I.

Quote:
bla bla bla 1 don't want to, l went to the shop
but I don't want to match

Quote:
Chapter 1 or Book 1 etc
I'm thinking that it needs to be a negative lookahead but can't get it right.
Code:
(?!(?i)(Chapter 1(\s?|<)|Part 1|Section 1|Book 1)) ([1|l])
Any suggestions?
Steadyhands is offline   Reply With Quote
Advert
Old 07-23-2017, 06:10 PM   #527
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,529
Karma: 11635512
Join Date: Dec 2012
Location: Altus, Oklahoma today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
This works:
"(?<!Chapter|Book|Part) ([1|l]) "
(without the quotes)

But you need to start the search at the beginning of the area...eg make sure the cursor isn't in the middle of the word "Chapter" or something.
Turtle91 is offline   Reply With Quote
Old 07-23-2017, 09:54 PM   #528
Steadyhands
Connoisseur
Steadyhands began at the beginning.
 
Steadyhands's Avatar
 
Posts: 55
Karma: 10
Join Date: Dec 2011
Device: Samsung Tablet
Thanks
Steadyhands is offline   Reply With Quote
Old 07-26-2017, 04:53 AM   #529
Steadyhands
Connoisseur
Steadyhands began at the beginning.
 
Steadyhands's Avatar
 
Posts: 55
Karma: 10
Join Date: Dec 2011
Device: Samsung Tablet
Here a regex I find useful for finding & correcting contractions that have spaces in them. Don't blast this with a replace all as it does match false positives where a word has been shortened to only a single letter.

Target text.
Quote:
don‘ t
wasn ’t
Couldn’ t
I ‘m
False positive
Quote:
Th’ lads ’re all
An’ let ’m
what ’m I going to do
Code:
Search \b(\s(‘|’)|(‘|’)\s)(d|m|s|t|ll|re|ve)\b(?!’)
Replace ’\4
Steadyhands is offline   Reply With Quote
Old 07-27-2017, 01:02 PM   #530
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
How would I remove
<b>Page 3</b><br>
<hr/>
<a id="p4">

I have tried [0-9]+<b>Page 3</b><br>
<hr/>
<a id="[0-9]+">

I have read through the manual and viewed a video on youtube and I seem to be missing something when I try to out in pdf to mobi conversion... what am I doing wrong?
niijii is offline   Reply With Quote
Old 07-27-2017, 01:36 PM   #531
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,468
Karma: 90388224
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
I have tried [0-9]+<b>Page 3</b><br>
<hr/>
<a id="[0-9]+">
Something along the lines of this should produce better results. But please test well; I'm winging this fairly blind (and am guessing that you want to remove ALL page numbers encountered)

Code:
<b>Page \d+</b><br>
<hr/>
<a id="p\d+">
DiapDealer is offline   Reply With Quote
Old 07-27-2017, 04:58 PM   #532
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
Quote:
Originally Posted by DiapDealer View Post
Something along the lines of this should produce better results. But please test well; I'm winging this fairly blind (and am guessing that you want to remove ALL page numbers encountered)

Code:
<b>Page \d+</b><br>
<hr/>
<a id="p\d+">
<br>
<b>Page 3</b><br>
<hr/>
<a id="p4"></a>

I couldn't get that to work and I am wondering if I am not posting all of it. The full thing is...

<br>
<b>Page 3</b><br>
<hr/>
<a id="p4"></a><b>Generated by ABC Amber LIT Conv<a href="http://www.processtext.com/abclit.html">erter, http://www.processtext.com/abclit.html</a></b><br>

I can remove the generated by abc part no problem and at times if I remove [hr/] helps... but it is the page numbers.
niijii is offline   Reply With Quote
Old 07-27-2017, 05:00 PM   #533
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
Quote:
Originally Posted by niijii View Post
<br>
<b>Page 3</b><br>
<hr/>
<a id="p4"></a>

I couldn't get that to work and I am wondering if I am not posting all of it. The full thing is...

<br>
<b>Page 3</b><br>
<hr/>
<a id="p4"></a><b>Generated by ABC Amber LIT Conv<a href="http://www.processtext.com/abclit.html">erter, http://www.processtext.com/abclit.html</a></b><br>

I can remove the generated by abc part no problem and at times if I remove [hr/] helps... but it is the page numbers.
Not sure if I am doing this correctly...

Last edited by niijii; 07-27-2017 at 05:07 PM.
niijii is offline   Reply With Quote
Old 07-27-2017, 05:10 PM   #534
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
It's working...THANK YOU!!!!
niijii is offline   Reply With Quote
Old 07-27-2017, 05:13 PM   #535
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: 50,394
Karma: 43720217
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by niijii View Post
How would I remove
<b>Page 3</b><br>
<hr/>
<a id="p4">
<b>Page [0-9]*</b><br>
<hr/>
<a id="p[0-9]*">

That should work for the search.
JSWolf is offline   Reply With Quote
Old 07-27-2017, 05:24 PM   #536
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,468
Karma: 90388224
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
[0-9]*
Matching a digit 0 or more times doesn't really make sense when there's never going to be no digit (though it will still work in this instance). Matching one or more digits [0-9]+ makes more logical sense. And \d+ is even simpler, since it's the exact same thing, but shorter and easier to type.
DiapDealer is offline   Reply With Quote
Old 07-27-2017, 05:26 PM   #537
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
I have > every so often in the text... how would I remove this?

Thank you so much for this.
niijii is offline   Reply With Quote
Old 07-27-2017, 05:28 PM   #538
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,468
Karma: 90388224
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by niijii View Post
I have > every so often in the text... how would I remove this?

Thank you so much for this.
That's going to be tricky, since the html tags can be easily mangled if you're not very careful.
DiapDealer is offline   Reply With Quote
Old 07-27-2017, 05:31 PM   #539
niijii
Member
niijii began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jul 2017
Location: Minnesota
Device: Kindle Voyage & Kindle Fire
It worked! Thank you to you both!

I wish there was simple instructional videos for this
niijii is offline   Reply With Quote
Old 07-27-2017, 05:35 PM   #540
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,468
Karma: 90388224
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by niijii View Post
It worked! Thank you to you both!

I wish there was simple instructional videos for this
No videos, but this is where I turn to for all my regex needs:

http://www.regular-expressions.info/
DiapDealer 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
Examples of Subgroups emonti8384 Lounge 32 02-26-2011 07:00 PM
Accessories Pen examples Gunnerp245 enTourage Archive 15 02-21-2011 04:23 PM
Stylesheet examples? Skitzman69 Sigil 15 09-24-2010 09:24 PM
Examples kafkaesque1978 iRiver Story 1 07-26-2010 04:49 PM
Looking for examples of typos in eBooks Tonycole General Discussions 1 05-05-2010 05:23 AM


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


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