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 02-20-2011, 10:21 AM   #1
dkelly701
Member
dkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animals
 
Posts: 16
Karma: 6620
Join Date: Jan 2011
Device: Nook
Metadata Search and Replace- Delete everything in square brackets?

I am trying to clean up some of my metadata using the search and replace feature. I have titles that have series information in them. The series information is in brackets. Can I create an expression that will delete the brackets and everything in the brackets? Below is an example.

[Eric John Stark] The Secret of Sinharat

Any help appreciated.

Last edited by Manichean; 02-20-2011 at 10:24 AM. Reason: fixed title
dkelly701 is offline   Reply With Quote
Old 02-20-2011, 10:26 AM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Sure. Search for
Code:
\[.*?\]\s(.*)
and replace with
Code:
\1
Manichean is offline   Reply With Quote
Advert
Old 02-20-2011, 10:35 AM   #3
dkelly701
Member
dkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animals
 
Posts: 16
Karma: 6620
Join Date: Jan 2011
Device: Nook
Thank you very much, worked like a champ.

Quote:
Originally Posted by Manichean View Post
Sure. Search for
Code:
\[.*?\]\s(.*)
and replace with
Code:
\1
dkelly701 is offline   Reply With Quote
Old 02-20-2011, 11:13 AM   #4
dkelly701
Member
dkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animals
 
Posts: 16
Karma: 6620
Join Date: Jan 2011
Device: Nook
One more question. I have more of the same except using parentheses instead of brackets. I tried just substituting parentheses for brackets in the expression but that didn't work. Example below. Obviously I don't have a clue what I am doing.

Lord Foul's Bane (The Chronicles of Thomas Covenant the Unbeliever, Book 1)
dkelly701 is offline   Reply With Quote
Old 02-20-2011, 11:37 AM   #5
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Try searching for
Code:
(.*?)\s\(.*?\)
and again replacing with
Code:
\1
There's also a regex tutorial available that may be of interest to you.
Manichean is offline   Reply With Quote
Advert
Old 02-20-2011, 11:50 AM   #6
dkelly701
Member
dkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animalsdkelly701 is kind to children and small, furry animals
 
Posts: 16
Karma: 6620
Join Date: Jan 2011
Device: Nook
Thank you again! Thanks also for the tutorial, hopefully I can get something out of it.

Quote:
Originally Posted by Manichean View Post
Try searching for
Code:
(.*?)\s\(.*?\)
and again replacing with
Code:
\1
There's also a regex tutorial available that may be of interest to you.
dkelly701 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Increase search and replace? user_none Conversion 24 04-08-2011 03:59 PM
Search and Replace problem naro_c Conversion 5 02-25-2011 12:59 AM
Search & Replace Pat Nickholds Sigil 2 10-21-2010 11:18 PM
Search and replace in 0.2.0 paulpeer Sigil 7 03-13-2010 11:59 AM
Why no search and replace? charleski Sigil 10 11-24-2009 04:13 PM


All times are GMT -4. The time now is 01:02 AM.


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