Quiero cambiar de minúsculas a mayúsculas en ciertas situaciones; por ejemplo, quiero cambiar todas las minúsculas después de un dos puntos a mayúsculas. No hay una sola regla que pueda usar en RegEx Pal para lograr esto, pero hay una función no documentada que me permite crear una lista de cambios simples para ejecutar. (NOTA: hay expresiones regulares que pueden hacer esto, pero no en RegEx Pal.)
Crear un documento de texto con entradas que sigan este formato:
# I can use the # to add comments to the list
: a-->: A
: b-->: B
: c-->: C
Lo que está a la izquierda se separa de lo que está a la derecha mediante -->
Una vez que guarde este archivo, puede usarlo en la ventana de búsqueda de RegEx Pal escribiendo:
-->{Path}\{Filename}
For instance:
-->c:\My Paratext 8 Projects\zzProj\shared\changes.txt
Cuando se ejecuta el archivo, resaltará el texto encontrado en todo el capítulo. Si ejecuta esto en Buscar/Reemplazar, resaltará el primer elemento encontrado y el texto restante, pero en el panel de reemplazo mostrará que está realizando reemplazos correctos. La ventana de reemplazo debe dejarse en blanco, ya que la lista proporciona el reemplazo
NOTA Mis experimentos con esto mostraron que no podía usar caracteres Unicode complejos. Si quería hacer un cambio como:
Jesus-->Jesús
tuve que guardar el archivo de texto en formato ANSI, de lo contrario la ú se corruptaría en el texto.
También
Si bien podía incluir espacios en el lado izquierdo del guion guion, no podía incluir un espacio al final del lado derecho; se eliminaría durante el procesamiento. Y si quería buscar en el lado izquierdo un punto o un signo de interrogación, estos tenían que escaparse primero:
\. a-->. A
\? a-->? A
Probablemente haya otras cosas que no funcionen exactamente como se espera. Si desea probar esto, sugiero comenzar con una lista muy simple y luego agregarle a medida que avanza.
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.
Traducción automática desde English Mostrar original