| 
			
			 | 
		#1 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,090 
				Karma: 447222 
				Join Date: Jan 2009 
				Location: Valley Forge, PA, USA 
				
				
				Device: Kindle Paperwhite 
				
				
				 | 
	
	
	
		
		
			
			 
				
				[Up] Search doesn't seem to work, [Down] does
			 
			
			
			Using 2.40 
		
	
		
		
			My 'All Upper Case' Saved Search used to find the text I can find it manually (1.jpg) but the same Find String in Saved Search doesn't seem to (2.jpg) As far as I can see the Find strings are identical Last edited by phossler; 10-04-2015 at 11:54 AM. Reason: Hopefully more information  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Its not just the expression, you have to check that the mode is the same and the search is running over the same set of files.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | |
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,090 
				Karma: 447222 
				Join Date: Jan 2009 
				Location: Valley Forge, PA, USA 
				
				
				Device: Kindle Paperwhite 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 However, the difference was the search that fails is Direction=Up (3.jpg and 4.jpg), and the one that works is Direction=Down (5.jpg) The manual S&R also fails if Direction=Up, even if the insertion point is below the text that should be found. Last edited by phossler; 10-04-2015 at 12:15 PM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			IIRC the regex engine cannot do reverse searches with back references, since at the time of the back reference, the group has not yet matched. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	You either need to replace \1 with [hH][1-6] or use direction down.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,090 
				Karma: 447222 
				Join Date: Jan 2009 
				Location: Valley Forge, PA, USA 
				
				
				Device: Kindle Paperwhite 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Darn 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Thanks for explaining  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Saved Search/Regex Functions | eschwartz | Editor | 86 | 05-03-2025 05:49 AM | 
| Saved Search: How 2 | theducks | Library Management | 3 | 11-27-2012 03:10 PM | 
| Editing a saved search | crossi | Library Management | 3 | 06-26-2012 01:12 PM | 
| Remove Saved Search | TonytheBookworm | Calibre | 3 | 12-10-2010 12:45 PM | 
| Need help setting up a saved search | ficbot | Calibre | 1 | 07-10-2010 03:10 PM |