09-23-2017, 05:04 PM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Sep 2017
Device: Kindle Paper White
|
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. |
09-23-2017, 09:34 PM | #2 |
Grand Sorcerer
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:
(.*) - (.*) |
Advert | |
|
Tags |
bulk edit metadata, calibre, regex |
|
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 |