Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 07-01-2010, 12:06 AM   #1
hlwilliams
Junior Member
hlwilliams began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2009
Device: none
Bookdesigner capitilize regex

I have an ebook that has chapter headers as "Chapter XX" instead of "CHAPTER XX". I can find them all with the find regex of "Chapter\W([a-zA-Z0-9]+)" but I cannot find any way to capitalize in the replace expression. I have tried several methods and that all insert the regex code as literal. Is there a way in bookdesigner to capitalize the replacement text?

Thanks
hlwilliams is offline   Reply With Quote
Old 07-01-2010, 08:45 AM   #2
acanthicus
Connoisseur
acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.
 
acanthicus's Avatar
 
Posts: 85
Karma: 82790
Join Date: Jan 2010
Device: PRS-505, PRS-650, PRS-350, PRS-T3
Hmm...
maybe I don't understand the problem, and I sure don't have a clue how to use RegExp, but why don't you just use find/replace:
find: Chapter ... replace all: CHAPTER ... maybe with "whole word" and/or "match case" checked.
??

acanthicus,
who ist wondering, if she is outing herself as extremely stupid...
acanthicus is offline   Reply With Quote
Advert
Old 07-01-2010, 02:54 PM   #3
hlwilliams
Junior Member
hlwilliams began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2009
Device: none
I guess I wasn't very clear. Not only do I want to replace "Chapter" but also the one, two. three... that comes after. I can use find/replace for just the "Chapter" part or if it is in the format of "Chapter 1". I would like to be able to replace "Chapter Twenty" with "CHAPTER TWENTY".
hlwilliams is offline   Reply With Quote
Old 07-01-2010, 03:47 PM   #4
acanthicus
Connoisseur
acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.acanthicus can do the Funky Gibbon.
 
acanthicus's Avatar
 
Posts: 85
Karma: 82790
Join Date: Jan 2010
Device: PRS-505, PRS-650, PRS-350, PRS-T3
Are your headings are formatted as "titles" or "subtitles"? Then you can find in format menu: "capitalize all titles" (subtitles).
acanthicus is offline   Reply With Quote
Old 07-01-2010, 08:01 PM   #5
hlwilliams
Junior Member
hlwilliams began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2009
Device: none
They are what ever they are when I open the file. The main question is how to capitalize replacement text in Bookdesigner.
hlwilliams is offline   Reply With Quote
Advert
Old 07-03-2010, 05:21 PM   #6
KNotTed
Member
KNotTed is on a distinguished road
 
Posts: 19
Karma: 62
Join Date: Feb 2010
Device: PRS-505, PRS-600
Assuming BookDesigner uses PCRE, you should be able to use the following:
Find: (Chapter\S+\w+)
Replace: \U\1\E
KNotTed is offline   Reply With Quote
Old 07-06-2010, 11:22 PM   #7
hlwilliams
Junior Member
hlwilliams began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Sep 2009
Device: none
I tried that and several other different combination's. It seems Bookdesigner doesn't use a standard of at least not a full set of Regular Expressions.
hlwilliams is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex engine? troymc Sigil 10 07-09-2010 04:52 PM
What's wrong with this regex? crutledge Sigil 1 05-11-2010 01:49 PM
What a regex is Worldwalker Calibre 20 05-10-2010 05:51 AM
Help with a regex A.T.E. Calibre 1 04-05-2010 07:50 AM
Regex help... Bobthebass Workshop 6 04-26-2009 03:54 PM


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


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