Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-26-2011, 03:04 PM   #1
LoveMyKobo
Member
LoveMyKobo began at the beginning.
 
LoveMyKobo's Avatar
 
Posts: 11
Karma: 10
Join Date: Apr 2011
Location: Ontario, Canada
Device: Kobo
Search & Replace "wildcards"?

I'm trying to edit the author fields in a library, because it has the author name, a hyphen, and a series name. I just want the author's name.

Example: Woods, Stuart - Stone Barrington 00

Is there a "wildcard" character I can use to replace everything after and including the hyphen with nothing?
LoveMyKobo is offline   Reply With Quote
Old 05-26-2011, 03:22 PM   #2
theducks
Grand Sorcerer
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: 14,631
Karma: 5628865
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by LoveMyKobo View Post
I'm trying to edit the author fields in a library, because it has the author name, a hyphen, and a series name. I just want the author's name.

Example: Woods, Stuart - Stone Barrington 00

Is there a "wildcard" character I can use to replace everything after and including the hyphen with nothing?
You want to keep the first wild card match

Warning this will match any title text that is hyphenated

also note: the pattern below is space hyphen space then wild-card
so wild-card is safe and wild - card will go bye-bye

Code:
(.+) - .+
the replace is a simple: \1 into the title field
theducks is online now   Reply With Quote
Old 05-26-2011, 03:51 PM   #3
LoveMyKobo
Member
LoveMyKobo began at the beginning.
 
LoveMyKobo's Avatar
 
Posts: 11
Karma: 10
Join Date: Apr 2011
Location: Ontario, Canada
Device: Kobo
Thanks so much! It worked perfectly.
LoveMyKobo is offline   Reply With Quote
Old 05-26-2011, 06:12 PM   #4
ArmorDog
Connoisseur
ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.ArmorDog ought to be getting tired of karma fortunes by now.
 
Posts: 93
Karma: 522110
Join Date: Dec 2010
Location: Canada
Device: Kobo Wifi and Kobo Touch and Kobo Glo
Regex is basically magic. =]
ArmorDog is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search & Replace: A few "How to" flopis Calibre 1 02-17-2013 01:23 PM
Feature Request - replace "screensavers" with randomly selected book covers from libr nathander13 Calibre 3 12-02-2009 12:21 PM
Question - Does iLiab have the "search" & "annotation, highlighting" features? HiSoC8Y iRex 5 07-01-2009 04:37 PM
Swap "Prev Page" & "Next Buttons" ???? kilofox Amazon Kindle 6 04-02-2008 11:39 PM


All times are GMT -4. The time now is 02:22 PM.


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