Je souhaite changer les minuscules en majuscules dans certaines situations - par exemple, je veux changer toutes les minuscules suivant un deux-points en majuscules. Il n'existe pas de règle unique que je puisse utiliser dans RegEx Pal pour accomplir cela, mais il existe une fonctionnalité non documentée qui me permet de créer une liste de modifications simples à exécuter. (NOTE : il existe des expressions régulières qui peuvent le faire, mais pas dans RegEx Pal.)
Créez un document texte avec des entrées qui suivent ce format :
# I can use the # to add comments to the list
: a-->: A
: b-->: B
: c-->: C
Ce qui se trouve à gauche est séparé de ce qui se trouve à droite par -->
Une fois que vous avez enregistré ce fichier, vous pouvez l'utiliser dans la fenêtre de recherche de RegEx Pal en tapant :
-->{Path}\{Filename}
For instance:
-->c:\My Paratext 8 Projects\zzProj\shared\changes.txt
Lorsque le fichier s'exécute, il mettra en surbrillance le texte trouvé dans le chapitre entier. Si vous exécutez cela dans une opération Rechercher/Remplacer, il mettra en surbrillance le premier élément trouvé et le texte restant, mais dans le panneau de remplacement, il indiquera qu'il effectue des remplacements corrects. La fenêtre de remplacement doit être laissée vide, car la liste fournit le remplacement.
NOTE Mes expériences avec cela ont montré que je ne pouvais pas utiliser de caractères Unicode complexes. Si je voulais effectuer une modification comme :
Jesus-->Jesús
Je devais enregistrer le fichier texte au format ANSI, sinon le ú serait corrompu dans le texte.
Aussi
Bien que je puisse inclure des espaces à gauche du tiret double, je ne pouvais pas inclure un espace à la fin du côté droit - il serait supprimé lors du traitement. Et si je voulais rechercher à gauche un point ou un point d'interrogation, ceux-ci devaient d'abord être échappés :
\. a-->. A
\? a-->? A
Il y a probablement d'autres choses qui ne fonctionnent pas tout à fait comme prévu. Si vous souhaitez essayer cela, je suggère de commencer par une liste très simple et de l'ajouter au fur et à mesure.
I want to change lowercase to uppercase in certain situations - for instance I want to change all lowercase after a colon to uppercase. There is no single rule that I can use in RegEx Pal to accomplish this, but there is an undocumented feature that lets me create a list of simple changes to run. (NOTE: there are regular expressions that can do this, but not in RegEx Pal.)
Create a text document with entries that follow this format:
# I can use the # to add comments to the list
: a-->: A
: b-->: B
: c-->: C
What is on the left is separated from what is on the right by -->
Once you save this file you can use it in the search window of RegEx Pal by typing:
-->{Path}\{Filename}
For instance:
-->c:\My Paratext 8 Projects\zzProj\shared\changes.txt
When the file runs it will highlight text found in the entire chapter. If you run this in a Find/Replace then it will highlight the first item found and remaining text, but in the replace panel it will show that it is doing correct replacements. The replace window should be left blank since the list is providing the replacement
NOTE My experiments with this showed that I could not use complex Unicode characters. If I wanted to do a change like:
Jesus-->Jesús
I had to save the text file in ANSI format or else the ú would be corrupted in the text.
Also
While I could include spaces on the left side of the hyphen hyphen, I could not include a space at the end of the right side - it would get removed in the processing. And if I wanted to search on the left for a period or question mark, these had to be escaped first:
\. a-->. A
\? a-->? A
There are probably other things that may not work quite like expected. If you want to try this, I suggest starting with a very simple list and then adding to it as you go.
Traduit automatiquement depuis English Afficher l'original