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 05-13-2018, 05:36 AM   #1
Sam Sahara
Connoisseur
Sam Sahara doesn't litterSam Sahara doesn't litterSam Sahara doesn't litter
 
Posts: 79
Karma: 228
Join Date: Aug 2014
Device: lambda k21
Editor: conversion to lowercase with regex

Hallo.

Can you suggest a regex to convert a group of uppercase letters to the same letters but lowercase?

Let say I have the following strings:

Code:
I. GROUP ONE
II. GROUP TWO
III. GROUP THREE
IV. GROUP FOUR
I'm looking for a regex to convert in the following way:

Code:
I. Group one
II. Group two
III. Group three
IV. Group four
---------

EDIT
I tried the following:

search
Code:
(.*?)\. ([A-Z])([A-Z ]*)
replace
Code:
\1. \u\2\L\3\E
but calibre gives: "error:incomplete escape \u at position xx"

Last edited by Sam Sahara; 05-13-2018 at 06:45 AM.
Sam Sahara is offline   Reply With Quote
Old 05-13-2018, 06:51 AM   #2
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,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
You can do that with one of the Regex functions. The search should be:

Code:
[IVX]+\. (.*?<)
That assumes the lines are wrapped in a tag.

Then select "Regex-funtion" as the mode and "Title-case text" as the function.
davidfor is offline   Reply With Quote
Advert
Reply

Tags
editor, regex


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RegEx: anchor problem in editor DrChiper Editor 4 04-09-2018 09:15 AM
regex in calibre editor mrmikel Editor 2 02-01-2014 10:39 AM
Guide to Regex in Calibre Editor vs Notepad++ Agama Editor 6 12-23-2013 05:10 AM
Conversion and Regex Help thedevilsjester Calibre 0 07-16-2010 06:10 PM
Need help with a conversion regex - can't match newline ereader123 Calibre 2 03-29-2010 10:58 AM


All times are GMT -4. The time now is 03:43 PM.


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