View Single Post
Old 05-26-2011, 03:22 PM   #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: 31,121
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
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 offline   Reply With Quote