| 
			
			 | 
		#1 | 
| 
			
			
			
			 Enthusiast 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 36 
				Karma: 2119794 
				Join Date: Jan 2016 
				
				
				
				Device: Kindle Paperwhite 2019 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Cleaning up with Search & Replace
			 
			
			
			So I just imported a list of my books from Goodreads into Calibre and need to do some cleanup. All of the imported books that are part of a series are now titled like so (apologies for extra ASCII): 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Title---------------------------------------------------------Series ======================================= Book Name (The Blah Saga, #7)-------------------------(empty) If possible, I'd like to change the metadata so it's more in line with the rest of my library: Title------------------Series =============================== Book Name----------The Blah Saga [7] Is this possible? If so, how? I'm pretty new to maniupulating the data like this in Calibre, so the more details, the better. Thanks!  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Moderator Notice 
		Moved from Template Questions to its own thread  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 The steps: 
 Code: 
	^(.*) \((.*), #(\d*)\) Note that the images show the regular expression Code: 
	^(.*).*\((.*), #(\d*)\)  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Enthusiast 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 36 
				Karma: 2119794 
				Join Date: Jan 2016 
				
				
				
				Device: Kindle Paperwhite 2019 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thanks. After working through this a couple of times (and cleaning up between each one), I am now getting a "could not convert string to float" error when trying to run the first S/R. This happens even on a smaller selection of books that I know for sure should match up with the regular expression. Time to restore my backup, I guess? 
		
	
		
		
			EDIT: Working with it some more, it appears to only match on books where the series name is a single word. For example: If the screenshot didn't come through: The title "The Android's Dream (The Android's Dream #1)" does not appear to be recognized by the expression and is unchanged from the "Text Test" to the "Test Result" columns. The title "Animal Farm (FarmyAnimal, #1)" IS recognized and "Test Result" shows a "1". Continuing through the rest of the S/R's looks like they are working as planned. Seems to be just the multi-word series giving me problems. Last edited by zakman; 04-18-2022 at 03:48 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 922 
				Karma: 810834 
				Join Date: Sep 2017 
				Location: Buenos Aires, Argentina 
				
				
				Device: moon+ reader, kindle paperwhite 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I have the name of the series and the number before the title, how would the regular expression be to clean it? 
		
	
		
		
		
		
		
		
		
		
		
		
	
	example: Series Name #015 - Book Title I want only the title to remain in its field  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Help with a search&replace | ownedbycats | Library Management | 3 | 03-08-2021 05:53 PM | 
| Regex in search problems (NOT Search&Replace; the search bar) | lairdb | Calibre | 3 | 03-15-2017 08:10 PM | 
| Search & Replace Help | paulfiera | Conversion | 7 | 08-06-2015 04:52 AM | 
| Help with a search & replace | mmholt | Library Management | 11 | 10-21-2011 07:49 PM | 
| Cleaning Title Names using Search and Replace | JTAL604622 | Calibre | 2 | 05-24-2011 06:23 AM |