Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-04-2017, 01:17 AM   #541
stumped
Guru
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: 715
Karma: 246812
Join Date: May 2016
Device: Samsung tab s , fire HDX 8.9, fire hd 8
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
Advert
Old 09-04-2017, 02:06 AM   #542
jbacelar
Interested in the matter
jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.jbacelar composes epic poetry in binary.
 
jbacelar's Avatar
 
Posts: 243
Karma: 90454
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook Touch HD
Search:
\.[^\s]
jbacelar is offline   Reply With Quote
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,251
Karma: 2334301
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
Flying Wheels
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: 11,234
Karma: 104259999
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD
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,251
Karma: 2334301
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
Flying Wheels
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: 11,234
Karma: 104259999
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD
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
Enthusiast
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: 48
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
Flying Wheels
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: 11,234
Karma: 104259999
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD
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: 1,596
Karma: 11700000
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
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
Flying Wheels
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: 11,234
Karma: 104259999
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD
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: 1,596
Karma: 11700000
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
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
Guru
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: 976
Karma: 5860817
Join Date: Jul 2012
Device: 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
Flying Wheels
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: 11,234
Karma: 104259999
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD
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
Guru
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: 976
Karma: 5860817
Join Date: Jul 2012
Device: 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:	46
Size:	24.8 KB
ID:	162390

So you can see that:

con (Spanish) =/= con (English)
Tex2002ans is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:16 AM.


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