Quero mudar letras minúsculas para maiúsculas em certas situações - por exemplo, quero mudar todas as letras minúsculas após dois-pontos para maiúsculas. Não há uma única regra que eu possa usar no RegEx Pal para fazer isso, mas há um recurso não documentado que me permite criar uma lista de alterações simples para executar. (OBSERVAÇÃO: existem expressões regulares que podem fazer isso, mas não no RegEx Pal.)
- Crie um documento de texto com entradas que sigam este formato:
# I can use the # to add comments to the list
: a-->: A
: b-->: B
: c-->: C
O que está à esquerda é separado do que está à direita por -->
- Depois de salvar este arquivo, você pode usá-lo na janela de pesquisa do RegEx Pal digitando:
-->{Path}\{Filename}
For instance:
-->c:\My Paratext 8 Projects\zzProj\shared\changes.txt
- Quando o arquivo é executado, ele destacará o texto encontrado em todo o capítulo. Se você executar isso em uma operação de Localizar/Substituir, ele destacará o primeiro item encontrado e o texto restante, mas no painel de substituição mostrará que está fazendo as substituições corretas. A janela de substituição deve ser deixada em branco, pois a lista está fornecendo a substituição.
OBSERVAÇÃO Meus experimentos com isso mostraram que não podia usar caracteres Unicode complexos. Se eu quisesse fazer uma alteração como:
Jesus-->Jesús
Eu tive que salvar o arquivo de texto no formato ANSI, caso contrário o ú seria corrompido no texto.
Também
Embora eu pudesse incluir espaços no lado esquerdo do hífen-hífen, não podia incluir um espaço no final do lado direito - ele seria removido durante o processamento. E se eu quisesse pesquisar à esquerda por um ponto ou ponto de interrogação, estes tinham que ser escapados primeiro:
\. a-->. A
\? a-->? A
Provavelmente há outras coisas que podem não funcionar exatamente como esperado. Se você quiser tentar isso, sugiro começar com uma lista muito simples e depois adicionando a ela conforme avança.
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.
Tradução automática de English