| 
			
			 | 
		#1 | 
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 2 
				Karma: 10 
				Join Date: Feb 2011 
				
				
				
				Device: Nook 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Regex setup for file name scheme
			 
			
			
			Ok these have been posted up several times and I am unfortunately unable to wrap my head around how to create these. Its unfortunate cause I have things named under several different formats. The current one Im working with looks like this for a series.  
		
	
		
		
		
		
		
		
		
		
		
		
		
			ebook - Alan Dean Foster - Spellsing 1 - Spellsinger And this is for a none series. ebook - Diana Wynne Jones - Howl's Moving Castle Can anyone post me up a string that will remove the ebook portion and leave me with title author and series all in the right places? Edit: I saw another format which was SciFi - Christopher Stasheff - Warlock 2 - Spite of Himself so I'm pretty much tryin to lop off the front end of each file name for the import Last edited by Ulfrich; 02-09-2011 at 01:38 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | |
| 
			
			
			
			 US Navy, Retired 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,897 
				Karma: 13806776 
				Join Date: Feb 2009 
				Location: North Carolina 
				
				
				Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?(?P<title>[^\-_0-9]+)  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 2 
				Karma: 10 
				Join Date: Feb 2011 
				
				
				
				Device: Nook 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thanks for the quick response, Ill have to check that program out. Tho I do admit Im tempted to ask to have it explained by someone who understands it and so I can ask questions, I could probably get it then.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | |
| 
			
			
			
			 US Navy, Retired 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,897 
				Karma: 13806776 
				Join Date: Feb 2009 
				Location: North Carolina 
				
				
				Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Good Luck.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004 
				Karma: 177841 
				Join Date: Dec 2009 
				
				
				
				Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Just stick a non-greedy match .*? for anything followed by a space - hyphen - space in front and it matches, but ignores the stuff in front of the first space - hyphen - space. This should do it: Code: 
	^.*? - ((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?(?P<title>[^\-_0-9]+)  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
![]()  | 
            
        
    
| Thread Tools | Search this Thread | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| The New Agency Pricing Scheme is Total B.S. | The-eBook-Reader | General Discussions | 44 | 04-08-2010 08:24 PM | 
| Sony is following the new industry standard pricing scheme. | thafrogggg | News | 7 | 04-01-2010 04:36 PM | 
| Change catalog scheme | sjohnson717 | Calibre | 5 | 03-04-2010 03:10 AM | 
| New rewards scheme at Directebooks.com | Direct Ebooks | News | 4 | 02-18-2010 12:44 AM | 
| How to setup a PDF file for the PRS-505 | James Cole | Sony Reader | 6 | 02-18-2009 12:04 AM |