Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-04-2017, 01:17 AM   #541
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
apologies if this is somewhere within the 539 previous posts...
I want to fix a few book errors where the is no space between a closing period and the 1st character of the next sentence. But I don't know how to do " not" in regex & the obvious search would be a "." followed by [ not a space - regular or nbsp ]
because a sentence can start with a letter or with an opening quote mark, and those come in various flavors
or is there a better way ?
stumped is offline   Reply With Quote
Old 09-04-2017, 02:06 AM   #542
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
Search:
\.[^\s]
jbacelar is offline   Reply With Quote
Advert
Old 02-11-2018, 10:29 PM   #543
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

I'd like to search all files for some unwanted characters (some of them are special). It's these ones:
Quote:
• ^ * | _ [
I tried to set up a regex but did not succeed to build a valid search.
roger64 is offline   Reply With Quote
Old 02-12-2018, 01:31 AM   #544
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,923
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Have you tried putting a backslash before each of them in your search term? Like:

Code:
([\•\^\*\|\_\[])
I'm not one of the experts, but this might be worth a try before they turn up.

EDIT: Just quickly tested the search. It works.

Last edited by doubleshuffle; 02-12-2018 at 01:33 AM.
doubleshuffle is offline   Reply With Quote
Old 02-12-2018, 03:12 AM   #545
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by doubleshuffle View Post
Have you tried putting a backslash before each of them in your search term? Like:

Code:
([\•\^\*\|\_\[])
I'm not one of the experts, but this might be worth a try before they turn up.

EDIT: Just quickly tested the search. It works.


My mistake was trying to insert a | between each character.
roger64 is offline   Reply With Quote
Advert
Old 02-18-2018, 05:56 AM   #546
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,923
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Question: Finding all Greek words

I'm working on a huge book which has lots of words in Greek. I want to put a span around each of them (or, if it's a string of words, around the whole string, ideally). Does anyone have an idea how to accomplish this with a regex?
doubleshuffle is offline   Reply With Quote
Old 02-18-2018, 06:27 AM   #547
Maui
Connoisseur
Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.
 
Maui's Avatar
 
Posts: 57
Karma: 600000
Join Date: Jan 2018
Device: Galaxy Tab S2
Search

(\p{Greek}{1,})

Replace

<span class="greek">\1</span>

with unchecked minimal match

Consecutive words can be bound together by

Find

</span> <span class="greek">

replace by one single blank
Maui is offline   Reply With Quote
Old 02-18-2018, 06:31 AM   #548
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,923
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Wow, thanks! I had no idea you could just specify Greek as a character class!
doubleshuffle is offline   Reply With Quote
Old 02-18-2018, 11:54 AM   #549
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I'm pretty sure that is checking for Greek 'letters' not words. As long as you are using the Greek alphabet and not a romanization/translation it should work fine.

Code:
\p{ name }	Matches any single character in the Unicode general category or named block specified by name.	

ex:
\p{Lu}              "C", "L" in "City Lights"
\p{IsCyrillic}	"Д", "Ж" in "ДЖem"
\p{IsGreekandCoptic}
That is a .NET regex reference...and I can't for the life of me remember which regex flavor Sigil uses...

edit:
Here is a link to a unicode regex reference list for anyone else looking.

Last edited by Turtle91; 02-18-2018 at 12:04 PM.
Turtle91 is offline   Reply With Quote
Old 02-18-2018, 12:01 PM   #550
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,923
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Well, Greek words written in Greek letters. That's what I was trying to find, and the regex worked perfectly for that. (Srsly, do you really think I would have asked for a regex to find Greek words written in the Latin alphabet???)
doubleshuffle is offline   Reply With Quote
Old 02-18-2018, 12:45 PM   #551
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Just wanted to clarify for others out there....

My wife is a Latin teacher with several years of Greek in school... She had several issues with romanized "Greek" words put out there by people trying to be 'helpful'.
Turtle91 is offline   Reply With Quote
Old 02-18-2018, 02:19 PM   #552
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Maui View Post
Search

(\p{Greek}{1,})

Replace

<span class="greek">\1</span>
One minor tweak. I would recommend replacing with:

Code:
<span class="greek" lang="grc" xml:lang="grc">\1</span>
or whatever Greek you are using:

grc: Ancient Greek (to 1453)
el: Modern Greek (1453-)

You could see the list of lang codes here:

https://www.iana.org/assignments/lan...ubtag-registry

Side Note: Marking your HTML up with proper lang is helpful (Dictionary lookup, Spellchecking, Hyphenation, Search, [...]).
Tex2002ans is offline   Reply With Quote
Old 02-18-2018, 04:10 PM   #553
doubleshuffle
Unicycle Daredevil
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 13,923
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
Thanks, I wasn't aware of that. Does the language info have to be in the html tags, or can I also put it in the stylesheet?
doubleshuffle is offline   Reply With Quote
Old 02-18-2018, 06:04 PM   #554
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by doubleshuffle View Post
Thanks, I wasn't aware of that. Does the language info have to be in the html tags, or can I also put it in the stylesheet?
In the HTML tags.

The code has the potential to look really ugly, so I would use it sparingly.

Text-to-Speech

For example, this would help text-to-speech read the words using the proper accents:

Code:
<p>I like to eat tacos.</p>
<p class="spanish" lang="es" xml:lang="es">Me gusta comer tacos.</p>
<p>Go with me to the store.</p>
"tacos" in Spanish sounds like "ta-cos", while English more like "ta-cohs".

"me" in Spanish is spoken like "may", while English is spoken like "mee".

Or you can mark a small group of words. For example, some styles make foreign words italic:

Code:
<p>The con artist ordered <i lang="es" xml:lang="es">pollo con carne</i> from the Mexican restaurant.</p>
Spellcheck

Also, Calibre supports Multi-Language Spellcheck, so when you use the Spellcheck word list you can see the differences:

Click image for larger version

Name:	CalibreMultiLanguageExample.png
Views:	348
Size:	24.8 KB
ID:	162390

So you can see that:

con (Spanish) =/= con (English)
Tex2002ans is offline   Reply With Quote
Old 12-11-2018, 02:43 PM   #555
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,022
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
I'm at a book where quotations are marked by right- (opening) and left-pointing double angle quotes (» and «).
First problem: Frequently, in the middle of direct speech marked as reported, there are citations that are as well marked by right- and left-pointing double angle quotes. I would like to replace those citations by single angle quotes. Is there a good way to find them (only in the middle of direct speech, not outside)?

Second problem: It appears, that at direct speech passages, there is an opening double angle, but the closing one is missing (by error of OCR, perhaps). How can I find (and replace) such items, please?
Edit: Sometimes it's vice-versa: the closing mark is there, but the opening one is missing.

Any help appreciated!

Last edited by Leonatus; 12-11-2018 at 02:49 PM.
Leonatus is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 11:20 PM.


MobileRead.com is a privately owned, operated and funded community.