|  06-19-2012, 08:25 AM | #76 | |
| Grand Sorcerer            Posts: 28,866 Karma: 207000000 Join Date: Jan 2010 Device: Nexus 7, Kindle Fire HD | Quote: 
 | |
|   |   | 
|  06-19-2012, 10:07 AM | #77 | 
| Wizard            Posts: 2,625 Karma: 3120635 Join Date: Jan 2009 Device: Kindle PW3 (wifi) | 
			
			OK. Thanks for your answer. I will try to find another solution
		 | 
|   |   | 
|  06-19-2012, 10:47 AM | #78 | 
| Grand Sorcerer            Posts: 5,762 Karma: 24088559 Join Date: Dec 2010 Device: Kindle PW2 | 
			
			You could create a simple sed script with one line for each character that you need to fix. E.g.  Code: s/A@/à/g s/B@/ç/g Code: sed -f fix.sed -i *.html | 
|   |   | 
|  06-19-2012, 11:07 AM | #79 | 
| Wizard            Posts: 2,625 Karma: 3120635 Join Date: Jan 2009 Device: Kindle PW3 (wifi) | 
			
			@Doitsu Wow!! It's working very well! Thanks a lot!! What means BOM? Last edited by roger64; 06-19-2012 at 11:26 AM. Reason: success | 
|   |   | 
|  06-19-2012, 11:09 AM | #80 | 
| Grand Sorcerer            Posts: 28,866 Karma: 207000000 Join Date: Jan 2010 Device: Nexus 7, Kindle Fire HD | 
			
			Sorry, I was only thinking in terms of the F&R regex feature of Sigil.    | 
|   |   | 
|  06-19-2012, 11:27 AM | #81 | 
| Wizard            Posts: 2,625 Karma: 3120635 Join Date: Jan 2009 Device: Kindle PW3 (wifi) | |
|   |   | 
|  06-19-2012, 11:28 AM | #82 | |
| Grand Sorcerer            Posts: 5,762 Karma: 24088559 Join Date: Dec 2010 Device: Kindle PW2 | 
			
			BOM = byte order mark.  At least the Windows GNU sed port requires that both the .html files and the sed script be utf8 files without byte order marks. AFAIK, .html files created by Sigil are automatically saved without BOMs. I.e. you only have to make sure that the sed script doesn't have one either. Quote: 
  But you are of course right, Sigil doesn't do sed. That's when even rudimentary sed or Perl skills come in handy. | |
|   |   | 
|  06-19-2012, 11:43 AM | #83 | 
| Grand Sorcerer            Posts: 28,866 Karma: 207000000 Join Date: Jan 2010 Device: Nexus 7, Kindle Fire HD | |
|   |   | 
|  06-19-2012, 03:00 PM | #84 | |
| Grand Sorcerer            Posts: 13,685 Karma: 79983758 Join Date: Nov 2007 Location: Toronto Device: Libra H2O, Libra Colour | Quote: 
 | |
|   |   | 
|  06-20-2012, 04:53 AM | #85 | 
| Wizard            Posts: 2,625 Karma: 3120635 Join Date: Jan 2009 Device: Kindle PW3 (wifi) | 
			
			Thanks all for the lesson.    | 
|   |   | 
|  06-22-2012, 07:05 PM | #86 | 
| Enthusiast            Posts: 43 Karma: 29634 Join Date: Jun 2012 Location: Poland, Poznań Device: Amazon Kindle Paperwhite 2 | 
			
			Hi! I'm looking for an expression that erase "- " but not " - ".  (example: sim- ple, not: word - word). Could somebody help me?? | 
|   |   | 
|  06-22-2012, 07:37 PM | #87 | 
| Well trained by Cats            Posts: 31,241 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | |
|   |   | 
|  06-22-2012, 07:48 PM | #88 | |
| Grand Sorcerer            Posts: 28,866 Karma: 207000000 Join Date: Jan 2010 Device: Nexus 7, Kindle Fire HD | Quote: 
 Find: (?<!\s)-\s Or: \w\K-\s Replace: <empty/blank> Please test first, and do keep in mind that there's many situations in normal written text where what you're looking for will (and should) occur. I certainly wouldn't suggest using "Replace all" but it may help you narrow down the occurrences enough where you can sign off on each and every replacement. Last edited by DiapDealer; 06-22-2012 at 08:45 PM. | |
|   |   | 
|  06-22-2012, 07:55 PM | #89 | 
| Addict            Posts: 344 Karma: 1222222 Join Date: Aug 2009 Location: Florida Device: Sony PRS-505 | 
			
			Help! I am clueless about regex. I have a Word document I saved as HTML Filtered (sure didn't seem to filter much!).  I imported it into Calibre and converted to ePub.  Between MSO and Calibre I ended up with over 41,000   rows in the CSS.  Every paragraph has its own class. Examples: <p class="MsoNormal79"><span class="calibre14"> <p class="MsoNormal80"><span class="calibre20"> <p class="MsoNormal81"><span class="calibre20"> <p class="MsoNormal82"><span class="calibre17"> I want them all to say: <p class="paragraphtext"> Can I put something in find to replace them all at once?  Karen | 
|   |   | 
|  06-22-2012, 09:07 PM | #90 | 
| Grand Sorcerer            Posts: 28,866 Karma: 207000000 Join Date: Jan 2010 Device: Nexus 7, Kindle Fire HD | 
			
			You could very well end up with a disaster if you're not careful. I would start with the paragraphs first as spans can get a bit hairy. If you're absolutely sure that you want to change everything that has a class name of "MsoNormalXX" (X being numerals) to "paragraphtext", then: Find: <p class="MsoNormal\d+"> Replace: <p class="paragraphtext"> Make sure you have good backups in case things don't turn out the way you've planned. | 
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Examples of Subgroups | emonti8384 | Lounge | 32 | 02-26-2011 06:00 PM | 
| Accessories Pen examples | Gunnerp245 | enTourage Archive | 15 | 02-21-2011 03:23 PM | 
| Stylesheet examples? | Skitzman69 | Sigil | 15 | 09-24-2010 08:24 PM | 
| Examples | kafkaesque1978 | iRiver Story | 1 | 07-26-2010 03:49 PM | 
| Looking for examples of typos in eBooks | Tonycole | General Discussions | 1 | 05-05-2010 04:23 AM |