| 
			
			 | 
		#1 | 
| 
			
			
			
			 Head of lunatic asylum 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349 
				Karma: 77620 
				Join Date: Jun 2012 
				Location: UTC +1 
				
				
				Device: Tolino Vision 3HD 
				
				
				 | 
	
	
	
		
		
			
			 
				
				How to covert integers to roman numerals?
			 
			![]() I just don't know what exactly I really need! Either a) a python code (to install in Regex-Function and convert with S&R any marked text) - here I may ask you how I specify/mark just these incidences: id="toc.html">1< or b) a 'normal' regex for to change integers to roman numerals. So the expressions look: Code: 
	<h4 class="roman" id="toc.html">1</h4>
Last edited by chaot; 03-14-2017 at 04:25 PM. Reason: trivia  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | |
| 
			
			
			
			 Interested in the matter 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 421 
				Karma: 426094 
				Join Date: Dec 2011 
				Location: Spain, south coast 
				
				
				Device: Pocketbook InkPad 3 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			jbacelar 25-12-14 in: MobileRead Forums > E-Book Software > Calibre > Editor > regex-function convert roman numerals. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Head of lunatic asylum 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349 
				Karma: 77620 
				Join Date: Jun 2012 
				Location: UTC +1 
				
				
				Device: Tolino Vision 3HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Important is to follow the instructions precisely (also with regard to the use of parentheses). 
		
	
		
		
		
		
		
		
		
		
		
		
		
			To convert integer 1 to I the search expression is (in my example) (html">)(\d+)(</h4>) Reinforced by this sense of achievement I can go to bed now.   very much!
		Last edited by chaot; 03-15-2017 at 12:30 PM. Reason: [strike] should be clear, it's code!  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 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 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			When you need to count in Roman numerals the following may help. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			<style> ol {list-style-type: upper-roman;} ol ol {list-style-type: upper-alpha;} ol ol ol {list-style-type: lower-roman;} ol ol ol ol {list-style-type: lower-alpha;} ol ol ol ol ol {list-style-type: decimal;} ol ol ol ol ol ol {list-style-type: lower-alpha;} </style> Dale Last edited by DaleDe; 03-14-2017 at 07:10 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Head of lunatic asylum 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349 
				Karma: 77620 
				Join Date: Jun 2012 
				Location: UTC +1 
				
				
				Device: Tolino Vision 3HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			@DaleDe Advantageously to know what all is possible. 
		
	
		
		
			BTW: "list-style" is shortcut for "list-style-type"! HTML Spoiler: 
 CSS (item + 4 subitems) Spoiler: 
 List (test) Last edited by chaot; 03-17-2017 at 02:29 PM. Reason: updating code & image  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
| Thread Tools | Search this Thread | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Using Roman Numerals in Chapter Titles | navyo | Editor | 5 | 06-30-2016 07:24 AM | 
| Chapter detection for roman numerals?? | g25 | Conversion | 6 | 09-08-2015 11:28 AM | 
| Disabling roman numerals in series display? | MelBr | Calibre | 2 | 09-19-2013 11:49 PM | 
| Convert Roman numerals to Arabic? | Peter W | Sigil | 2 | 04-09-2012 12:55 PM | 
| regex search for roman numerals | Blurr | Calibre | 2 | 12-16-2009 06:55 PM |