Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-30-2016, 06:00 PM   #1
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Regex: Search and Replace

Hi folks,
after a long period of abstinence i have again a little question regarding Regex in the search and replace window (Tag Editor)

After adding a lot of books most of them have following content in the author field:

3540 - John Muster, bla bla

What i want to do is filter out everything but the first 4 digits and than insert the result in the Series Index field. I know how to filter out numbers and replace them, but not how to filter everything out but the first numbers.

Any help would be appreciated.
Thanks
Thomas_AR is offline   Reply With Quote
Old 03-31-2016, 01:04 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Why not something like (\d+) - (.+)

Replace series_index with \1 and then replace authors with \2
eschwartz is offline   Reply With Quote
Advert
Old 03-31-2016, 06:23 PM   #3
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Thanks, that did the trick
Thomas_AR is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
regex search/replace - how to? Alt68er Sigil 1 03-11-2014 08:53 PM
Regex search and replace dwlamb Sigil 6 04-12-2013 02:34 PM
regex search/replace Sharlene Sigil 10 01-28-2012 04:14 AM
Search & Replace/Regex help!! millertime13 Conversion 4 07-22-2011 02:40 AM
need regex help search and replace schuster Calibre 4 01-10-2011 09:00 AM


All times are GMT -4. The time now is 09:25 PM.


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