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 09-23-2017, 05:04 PM   #1
pappabees61
Junior Member
pappabees61 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2017
Device: Kindle Paper White
Cool Help with Reg-ex of Course

Hello all and thank you for reading this post and hopefully replying. I am not very good with Regex but have been trying stuff and can't make this happen.
I have over 100 books that have this in the authors name
Osprey - Warrior 136.. of course the others have different numbers.
I would like to move this to series and series index and I get that it will probably have to be done in two passes however I can't seem to get the bulk editor to replace just the two first words without the - sign.

I can have the search field with authors
and search for (.?) - (.?)
which I am used to having it bring up two fields separated by a dash however just the first field brings the entire string into the test result area
so it looks like this
Book 1: Osprey - Warrior 136
Book 2: Osprey - Warrior 137

I have selected the destination field to be series but the test has the entire string in it. How do I select just Osprey Warrior for the first pass and then change to Series Index for the 2nd pass and just get the numbers?

any help is greatly appreciated.
pappabees61 is offline   Reply With Quote
Old 09-23-2017, 09:34 PM   #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
The problem is the regex. ".?" will match zero or one character. You probably need to use:

Code:
(.*) - (.*)
Then use "\1" for the first part, and "\2" for the second in the replace field.
davidfor is offline   Reply With Quote
Advert
Reply

Tags
bulk edit metadata, calibre, regex


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reg Ex Help - Copy to Series Field nynaevelan Calibre 15 08-18-2012 05:46 AM
E-book hardware rant at The Reg Brainphart General Discussions 12 04-20-2012 05:30 PM
Reg-ex help...? ElMiko Sigil 11 12-06-2011 12:41 AM
Adobe Reg problem on PE Gremalkin enTourage eDGe 5 09-02-2011 03:01 PM
Reg expression for importing Debby Library Management 2 02-17-2011 11:20 AM


All times are GMT -4. The time now is 04:17 AM.


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