Thread: Regex examples
View Single Post
Old 08-11-2012, 10:03 PM   #122
Gunnerp245
Gadget Freak
Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.Gunnerp245 ought to be getting tired of karma fortunes by now.
 
Gunnerp245's Avatar
 
Posts: 1,130
Karma: 1043832
Join Date: Nov 2007
Location: US
Device: EE, PE, Note 8
Red face

Quote:
Originally Posted by Gunnerp245 View Post
I would like to change the capitalization a particular phrase across a book e.g. chapter one to Chapter One. I can detect the instances using (\D+) (\D+) and know the replacement would be \1 \2, but not how to change the capitalization.
Quote:
Originally Posted by Doitsu View Post
A quick and dirty solution would be:
Find: (chapter) ([[:lower:]]+)
Replace: \u\1 \u\2
This requires Sigil 0.5.3 (or higher).
@Doitsu - Left out key information initially, I am attempting this is calibre 'search and replace'..
Gunnerp245 is offline   Reply With Quote