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-12-2015, 12:55 PM   #1
Thom*
The Fumbler
Thom* began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Jun 2015
Device: android 4.2/fbreader
Ugly all caps

Many books start each chapter or each scene change with a string of all Capital text. I do not like the practice and would like a search/replace to change this. I can handle the replace part, but I am struggling with a search statement.

Is there a regex search that will find these strings of CAPITAL LETTERS with space interspersed?
Thom* is offline   Reply With Quote
Old 12-12-2015, 12:58 PM   #2
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: 79,696
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Most of the time it's small caps.
JSWolf is offline   Reply With Quote
Advert
Old 12-12-2015, 01:26 PM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,478
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Code:
[A-Z ]+
will match a sequence of one or more capital letters and/or spaces

The challenge will be to limit that to only matching at the start of a chapter or scene change
PeterT is offline   Reply With Quote
Old 12-12-2015, 02:16 PM   #4
Thom*
The Fumbler
Thom* began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Jun 2015
Device: android 4.2/fbreader
Re: [A-Z ]+

Yeah, limiting it is the problem. It matches ever single space as well. And you might imagine that there are more than 2 single spaces in a book.
Thom* is offline   Reply With Quote
Old 12-12-2015, 07:29 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Code:
<p.*?>[A-Z][A-Z ]{2,}
That should get pretty close.
davidfor is offline   Reply With Quote
Advert
Old 12-12-2015, 07:39 PM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,478
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I wonder if this might best be done by a editor plugin?
PeterT is offline   Reply With Quote
Old 12-13-2015, 11:00 AM   #7
Thom*
The Fumbler
Thom* began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Jun 2015
Device: android 4.2/fbreader
Quote:
Originally Posted by davidfor View Post
Code:
<p.*?>[A-Z][A-Z ]{2,}
That should get pretty close.
That is pretty close, thanks for the help.

I am convinced that there is so much variability that the only solution is look at each one and make changes accordingly. Probably search for scene changes then deal with the leading string for each occurrence.

Thanks again for the input.
Thom* is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RegEx Question: H1 ALL CAPS to All Caps phossler Sigil 21 02-06-2014 02:44 PM
They Are Soooo UGLY! Faterson Marvin 19 09-27-2013 02:15 PM
Why E-Books Look So Ugly jankovicgood News 38 09-04-2009 07:19 PM
Ugly formatting Tanzaku Workshop 62 12-25-2007 02:35 AM
Kindle is Ugly halljames Amazon Kindle 48 11-29-2007 01:45 PM


All times are GMT -4. The time now is 08:13 AM.


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