View Single Post
Old 11-21-2022, 01:02 PM   #2
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 446
Karma: 672378
Join Date: Dec 2017
Device: Kobo
Chalut

To switch "Lastname,Firstname" to "Firstname Lastname", it's strangely easier than you think. A simple "([^,&]+),([^,&]+)" => "\2 \1" is enough.

For "Bloodthorne,Ralts & Lastname,Firstname", the result will be "Ralts Bloodthorne&Firstname Lastname" (Calibre will automatically transform it into a valid format "Ralts Bloodthorne & Firstname Lastname"). No need to worry about the ampersand, it seems to work.

And if you haven't already done, I advise you to use the Mass Search/Replace plugin which will allow you to quickly launch various saved operations.

Français:
Spoiler:
Pour intervertir "Nom,Prénon" vers "Prénom Nom", s'est bizarrement plus simple qu'on ne le croit. Un simple "([^,&]+),([^,&]+)" => "\2 \1" suffit.

Pour "Bloodthorne,Ralts & Nom,Prénon", le résultat sera "Ralts Bloodthorne&Prénom Nom" (Calibre le transformera automatiquement en format valide "Ralts Bloodthorne & Prénon Nom"). Pas besoin de s'occuper de l'éperluette, apparemment ça passe.

Et si s'est pas déjà fait je te conseil le plugin Mass Search/Replace qui te permettra de lancé rapidement diverse opérations sauvegardé.
un_pogaz is offline   Reply With Quote