![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 666666
Join Date: Feb 2019
Device: Kindle Paperwhite
|
Search & Replace not working properly
I use calibre's search & replace feature to enable ligatures in the book (fi, fl) and they work great, but sometimes, within a book there are some fi's and fl's that are not replaced by their ligature glyph, as if calibre skipped over them. What's wrong here?
I'm using calibre 3.48 (last version supported by my mac) and convert to azw3 and I use the "hyphenate this" plugin. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
if you use hyphenate this then there will be hyphens between some chanracters. Your search expression needs to take that into account.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 666666
Join Date: Feb 2019
Device: Kindle Paperwhite
|
How do I do this? Right now, all I have calibre replace are the fi & fl glyphs.
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your search expression needs to include an optional soft hyphen character. Or alternately use the polish books tool first, to remove the soft hyphens, do your search replace and then put them back using polish books or hyphenate this if you prefer.
|
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 666666
Join Date: Feb 2019
Device: Kindle Paperwhite
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Personally, it makes a lot more sense to remove the hyphenation and only run Hyphenate This! on the book after you have finished editing the book. It should be one of the last steps in your book processing. |
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Code:
f\u00ad?i |
![]() |
![]() |
![]() |
#8 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 666666
Join Date: Feb 2019
Device: Kindle Paperwhite
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 666666
Join Date: Feb 2019
Device: Kindle Paperwhite
|
|
![]() |
![]() |
![]() |
#10 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
As to Kovid's short reply, that was the search string to find all an occurrence of "f" followed by a soft-hyphen (using the unicode value for the character) and then an "i". Put that into the the find field, change the mode to "Regex" and press the find button. That will find the problem. If what you want to do is remove all the occurrences of "fl" and "fi" with a soft-hyphen in the middle, you could use the search: Code:
(f)\u00ad([il]) Code:
\1\2 Of course, if the Hyphenate This! plugin is putting a hyphen between these characters it could be a bug in that plugin. Maybe you should ask the plugin's author about this. |
|
![]() |
![]() |
![]() |
#11 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 666666
Join Date: Feb 2019
Device: Kindle Paperwhite
|
Really appreciate you taking the time to respond.
Unfortunately, I still haven't figured it out. Some ligatures are working, and some aren't, I will have to live with that. Thanks! |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex in search problems (NOT Search&Replace; the search bar) | lairdb | Calibre | 3 | 03-15-2017 07:10 PM |
regexp search/replace not working as expected on individual authors in source field | masp | Library Management | 9 | 08-08-2015 10:33 PM |
Search and Replace No Longer Working | ssolitar | Editor | 2 | 05-04-2014 05:33 PM |
Simple Search & Replace not working!? | MontyJ | Conversion | 1 | 07-14-2012 07:13 PM |
Search and replace not working | helmerer | Conversion | 4 | 02-25-2011 03:48 AM |