![]() |
#1 |
Member
![]() Posts: 17
Karma: 10
Join Date: Aug 2011
Device: kindle
|
Articles with apostrophes in title_sort
I searched the forums unsuccessfully before deciding to sign up and posting this question.
Problem - I have several ebooks where the title begins with an article ending with an apostrophe. Example: L'affaire Saint-Fiacre. I would like the title_sort value to be affaire Saint-Fiacre, L'. My attempts at solving it - I have tried to change the setting in [Preferences -> Tweaks -> Set the list of words considered 'articles' when computing title_sort], so I edited the regexp adding |l' inside it, but it doesn't work. Next, I tried to add one and then two backslashes thinking I have to quote the apostrophe - which can be interpreted as a single quote, so I tried with l\' and l\\' but none of my attempts has had success. Any advice? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,258
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Code:
r"^(A\s+|The\s+|An\s+|L')" |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 17
Karma: 10
Join Date: Aug 2011
Device: kindle
|
Wow, that was quick - thanks!
![]() I had also tried to factor articles that are followed by a space, but that didn't work either Code:
SOMETHING LIKE THIS DOESN'T WORK ^((A|An|The|Un|Une)\\s+)|L') |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,374
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
FWIW: this topic was discussed in the thread https://www.mobileread.com/forums/sho...d.php?t=144900
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Quotes, apostrophes, what a pain. | draconic | Conversion | 4 | 12-30-2011 10:23 AM |
Using author_sort, title_sort names | meme | Development | 6 | 02-23-2011 01:41 PM |
title_sort in metadata edit dialogue | phenomshel | Calibre | 9 | 12-27-2010 12:39 AM |
Birmingham drops apostrophes | HarryT | Lounge | 22 | 01-31-2009 06:44 AM |
Help - Calibre stripping out apostrophes and quotes | GingerTez | Calibre | 3 | 11-13-2008 04:31 PM |