01-13-2013, 06:54 PM | #166 |
Member
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
|
Simple question about quotes
I have two very basic questions. First about finding straight quotes (") and replacing them with curved opening quotes [A-Z] then the different curved closing quotes using maybe [," or ." or ?" or !"].
And here's why. . . I want to eventually find paragraghs with broken quotes. Paragraphs that have a “ (opening quote) but not a ” (closing quote). Does this make sense? So this is a two part question. Thanks so much . . . I know you brainyachs will have a solution. I am using Sigil v 0.6.2 |
01-13-2013, 07:24 PM | #167 | |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Good luck How do you tell where the missing quote belongs? "That's nice," she said. "I'll take it from here." 'Smarty' can handle most straight=>curly conversions, but I don't think it comes with a Ouija board plugin |
|
Advert | |
|
01-13-2013, 07:32 PM | #168 |
Member
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
|
There would be an opening quote in one paragraph and the closing quote in the next paragraph. I want to bring the two paragraphs together. I also prefer the curved quotes to the straight quotes in books.
|
01-13-2013, 07:37 PM | #169 | |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Smarty (is used in Calibre and may be available elsewhere), can then do the curly conversion. |
|
01-13-2013, 07:41 PM | #170 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
This is simply something that regex doesn't lend itself very well to. Heuristic algorithms are better suited for this job (but can still fall short of being perfect).
|
Advert | |
|
01-13-2013, 07:59 PM | #171 |
Member
Posts: 24
Karma: 10
Join Date: Mar 2011
Location: Colorado
Device: Cruz Tablet
|
OK, I will check into making changes in Calibre tho I would not know how to distinguish between Opening and Closing quotes when straight quotes are used in the original text. I thought Regex would probably be good at that.
My thanks to theducks and DiapDealer Last edited by ReaderRabbit; 01-13-2013 at 08:02 PM. |
01-14-2013, 03:10 AM | #172 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
01-15-2013, 11:47 AM | #173 |
Member
Posts: 21
Karma: 10
Join Date: Jan 2013
Device: none
|
I'm sorry I have gone through the thread, but couldn't find anything that would work for my needs. I've read the wiki article, tried in vain many different combinations, but I'm obviously doing something wrong.
I would appreciate a little help on this: I need to make a simple match to grab this thing with whatever characters within the id name: <h2 class="story_title" id="(whatever)"> Many many thanks! ----------Edited------------ I found one in the "Saved Searches" in Sigil, touched it up a bit and it did the job. (?sU)<h2([^>]*>.*) Last edited by Ahu Lee; 01-15-2013 at 05:51 PM. Reason: Found the solution. \ TypoS |
01-15-2013, 08:20 PM | #174 | |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
<h2 class="story_title" id="(.+?)"> |
|
01-16-2013, 01:58 PM | #175 | ||
Member
Posts: 21
Karma: 10
Join Date: Jan 2013
Device: none
|
Quote:
Though, I'm not sure I understand this (not English-wise, but just what it's all about ): Quote:
Thank you very much! Last edited by Ahu Lee; 01-16-2013 at 02:02 PM. |
||
01-16-2013, 09:09 PM | #176 | |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
1) you are not in REGEX mode 2) you have accidentally included a Leading or trailing space in the search selection <<< I choose this one ( ) delineate the captured (stuff ) text |
|
01-17-2013, 07:43 AM | #177 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Jan 2013
Device: Kobo Glo
|
Could anybody help me in this case?:
There is a code from EPUB: Quote:
I tried to use: (*[a-z])</p> <p class="calibre2">([a-z]*) <-- did not worked. Is said. that no match found. Last edited by LightFromMoon; 01-17-2013 at 07:46 AM. |
|
01-17-2013, 08:04 AM | #178 |
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
this should work, but i'd still go through the file and replace them one at a time. it'll match a </p> not preceded by a non-alphanumeric character (like ?, ., !, etc.)
Code:
find: (?<!\W)</p>\s+<p[^>]*> rep: <---- this is a single space Last edited by mzmm; 01-17-2013 at 08:07 AM. |
01-17-2013, 08:19 AM | #179 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Jan 2013
Device: Kobo Glo
|
Quote:
Excuse me, but it didn't work for me. No matches found .... |
|
01-17-2013, 08:22 AM | #180 |
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
|
|
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 |