| 
			
			 | 
		#1 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470 
				Karma: 13095790 
				Join Date: Aug 2007 
				Location: Grass Valley, CA 
				
				
				Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Tidy use and issue
			 
			
			
			I was cleaning up a book that started out as nearly pure text and was taking advantage of tidy. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Here is some of my experiences: I found a way to identify some text so that I could change an entire book with find and replace: I made a span around some leading text and tidy make the /span at the end of the paragraph. I made a /span where I really needed it and tidy removed the one it built. Note that the first time I tried to put the /span in first but tidy removed it. the order is important. Later I need to change certain paragraphs (chapters) to h3 so they would go in the TOC. I searched and replaced <p>Chapter ... with <h3>Chapter ... and expected tidy to fix the /h3 which it did. However, in a retro work around design dating back to html version 3 before css it also decided to add spacing so my file now looks like: <h3>Chapter text<br /> <br /></h3> Stupid tidy, a bug that needs fixing. However, now I have all these extra breaks. I am no expert on using regular expressions and this one has to cross a CR/LF sequence on my PC. How can a code the find to find and select both breaks? Dale  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | |
| 
			
			
			
			 eBook FANatic 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301 
				Karma: 16078357 
				Join Date: Apr 2008 
				Location: Alabama, USA 
				
				
				Device: HP ipac RX5915 Wife's Kindle 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  )Find: Code: 
	<h3>([^~]+?)<br /> <br /></h3> Code: 
	<h3>\1></h3> Last edited by crutledge; 06-18-2011 at 05:15 PM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470 
				Karma: 13095790 
				Join Date: Aug 2007 
				Location: Grass Valley, CA 
				
				
				Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			How can I input two lines in the Find? The find inside Sigil only allows one line. That is the problem I am having.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 974 
				Karma: 4999999 
				Join Date: Mar 2009 
				Location: Rosario, Argentina 
				
				
				Device: SONY PRS-T2, Kindle Paperwhite 11th gen 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Something I think has worked for me in the past: just select what you want to search for in Code View, including both lines. Copy and paste into the search box. Hope it helps.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470 
				Karma: 13095790 
				Join Date: Aug 2007 
				Location: Grass Valley, CA 
				
				
				Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 974 
				Karma: 4999999 
				Join Date: Mar 2009 
				Location: Rosario, Argentina 
				
				
				Device: SONY PRS-T2, Kindle Paperwhite 11th gen 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | |
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 ![]() Use \s+ at the place of the EOL would be. Actually, I use it to search everywhere there was white space (except when I deliberately want to find a set number of spaces) Code: 
	<h3>Chapter (.+)<br />\s+ <br />\s+</h3> <h3>Chapter \1</h3>  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470 
				Karma: 13095790 
				Join Date: Aug 2007 
				Location: Grass Valley, CA 
				
				
				Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thanks for the \s+ I was wondering what to use. I will give this a try next time I hit a problem like this. For now I am good. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Dale  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Love Sigil, Hate HTML Tidy | Danger | Sigil | 2 | 12-25-2010 09:00 PM | 
| tidy still helping me - sigh... | bobcdy | Sigil | 2 | 12-19-2010 08:14 PM | 
| Sigil, HTML Tidy or PEBCAK? | DTM | Sigil | 6 | 09-26-2010 09:49 PM | 
| HTML Tidy problems | pdurrant | Sigil | 2 | 04-08-2010 08:38 AM | 
| 0.5.2 Issue | drmathprog | Calibre | 3 | 03-25-2009 11:33 PM |