Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-21-2018, 08:23 AM   #1
quicks
Junior Member
quicks began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2016
Device: none
How to get first number of characters in the title to the back of the title

Folks,


I have a lot of books where the title is something like :

(ABCD)EFGH

How can i get the left and right parenthesis and all the text between the parenthesises and put that behind the rest of the title (and a space) so that the title looks like :

EFGH (ABCD)

I assume I have to work with regular expressions but I don't have any idea where to start..

Thanks in advance..
quicks is offline   Reply With Quote
Old 05-21-2018, 10:18 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Bulk mode Search and replace

NOT TESTED
Code:
(\(.+?\))(.+?)
Code:
\2<a space>\1
theducks is offline   Reply With Quote
Advert
Old 05-21-2018, 04:08 PM   #3
quicks
Junior Member
quicks began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2016
Device: none
Thanks, but it's not working :-( Somehow it's not getting the correct data in the search and places in the wrong place with the replace function..




Last edited by quicks; 05-21-2018 at 04:11 PM.
quicks is offline   Reply With Quote
Old 05-21-2018, 04:16 PM   #4
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Could you try:

Code:
\(([^)]+)\)(.+)
Code:
\2 (\1)
Terisa de morgan is offline   Reply With Quote
Old 05-21-2018, 04:39 PM   #5
quicks
Junior Member
quicks began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2016
Device: none
Thumbs up

Quote:
Originally Posted by Terisa de morgan View Post
Could you try:

Code:
\(([^)]+)\)(.+)
Code:
\2 (\1)


Perfect! Thank you!

Little bit here: I know those regular expressions are powerful. If I want to learn how to code/write them, what is the best site/book I can start with? There's so much information out there on the Internet I don't know what's best for a beginner.
quicks is offline   Reply With Quote
Advert
Old 05-21-2018, 05:10 PM   #6
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by quicks View Post


Perfect! Thank you!

Little bit here: I know those regular expressions are powerful. If I want to learn how to code/write them, what is the best site/book I can start with? There's so much information out there on the Internet I don't know what's best for a beginner.
https://manual.calibre-ebook.com/reg...reference.html
That is a quick reference I highly recommend you bookmark or download.

https://manual.calibre-ebook.com/regexp.html
calibre regexp tutorial.

bernie
gbm is offline   Reply With Quote
Old 05-22-2018, 03:13 PM   #7
quicks
Junior Member
quicks began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2016
Device: none
Quote:
Originally Posted by gbm View Post
https://manual.calibre-ebook.com/reg...reference.html
That is a quick reference I highly recommend you bookmark or download.

https://manual.calibre-ebook.com/regexp.html
calibre regexp tutorial.

bernie
Thanks!
quicks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to replace characters in title mariaclaudia Calibre 5 03-29-2018 10:30 PM
Aura Books not listed by title but just "<title> - <number> - <series>" qee4q Kobo Reader 12 05-10-2015 04:37 PM
ID number and title jjansen Calibre 5 10-04-2010 10:19 AM
Non-English characters in title / author lejuan Calibre 7 01-18-2010 03:52 PM
Title (Number)? Djehuty Calibre 2 04-01-2009 10:46 PM


All times are GMT -4. The time now is 10:40 AM.


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