![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 383
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Can you match a NON-character...?
I'm trying to correct, in bulk, omissions of apostrophes, such as: Im, cant, wont, couldnt.
Is there a way to match the non-space between "t" and the penultimate letter so i can simple insert an apostrophe as a replace value? basically, i'm looking for the functional equivalent of: Code:
(?<=\bI)[non-space, non-character](?=m\b)
|
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,903
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
not a REGEX solution
![]() Have you tried the Spellcheck feature. when you select a word in the list, then correct it for all occurrences |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 383
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
DAAAAANG....
I figured as much, but I hoped one of the gurus would have a silver bullet where all my plain-vanilla lead bullets had failed. Spellcheck doesn't catch several of the most common instances since they are, technically, words: Id, wont, cant. Well, if apostrophe strikes—sorry, i mean, epiphany—let me know... |
![]() |
![]() |
![]() |
#4 |
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
I'm sure there is a regex for what you want...theducks was just pointing out a non-regex approach.
The Spellcheck window can also list every word in your book, not just the misspelled ones. But even though you could filter on "t" there would probably still be a lot of words to look through. Even a regex would give you a lot of words to check as well if you're just looking for words ending in t. |
![]() |
![]() |
![]() |
#5 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,903
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() The spell check approach means you just check a few known words that might need the apostrophe (you sill need to fix those other spelling errors ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,357
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm not certain I'm entirely following. In your pseudo-regex:
Code:
(?<=\bI)[non-space, non-character](?=m\b) |
![]() |
![]() |
![]() |
#7 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 383
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,357
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Last edited by DiapDealer; 03-25-2013 at 07:37 PM. |
|
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
You do the work once, create lots of Sigil Saved Searches replacing all of the unapostrophed with the apostrophe versions, and then spread your Saved Search file to everyone else, so we won't have to do it. ![]() |
|
![]() |
![]() |
![]() |
#10 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Hmm... Would using the {0} multiplier work? Something like:
Code:
(?<=\bI)'{0}(?=m\b)
![]() |
![]() |
![]() |
![]() |
#11 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
The list of normal contractions is relatively small (sorry the forum doesn't like tables but you can find it here):
aren't are not can't cannot couldn't could not didn't did not doesn't does not don't do not hadn't had not hasn't has not haven't have not he'd he had; he would he'll he will; he shall he's he is; he has I'd I had; I would I'll I will; I shall I'm I am I've I have isn't is not let's let us mightn't might not mustn't must not shan't shall not she'd she had; she would she'll she will; she shall she's she is; she has shouldn't should not that's that is; that has there's there is; there has they'd they had; they would they'll they will; they shall they're they are they've they have we'd we had; we would we're we are we've we have weren't were not what'll what will; what shall what're what are what's what is; what has what've what have where's where is; where has who'd who had; who would who'll who will; who shall who're who are who's who is; who has who've who have won't will not wouldn't would not you'd you had; you would you'll you will; you shall you're you are you've you have There are multiple duplications that allow a handful of regex's to cover the list. I actually had a saved search group that did this - it was only a half-dozen or so steps. Unfortunately, I lost the group when my hard drive was replaced and haven't recreated it yet. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Does Kobo Price Match? | Big McLargeHuge | Kobo Reader | 5 | 11-14-2012 11:28 PM |
Can't match Unicode character | atordo | Recipes | 2 | 06-15-2012 03:20 PM |
how to have regex dot match any character including newline? | gnychis | Calibre | 5 | 11-30-2010 06:35 PM |
SonyStyle Price Match | Zen-Diego | Sony Reader | 3 | 05-06-2009 03:07 PM |