- May 2, 2021
- 63
- 50
Regular expressions are like mathematics if you don't describe the problem well, it becomes impossible to solve:No, what I mean is that even if it's a sentence, the entire line only has lowercase letters. If there are no uppercase letters, it won't be translated
As long as there are capital letters, they will be translated
For example, This sentence = There are capital letter , translate
for example, this sentence = All lowercase letters, no translate
Currently, what I am writing is:/^ [a-z0-9]+/gm,
But they only ignore the preceding words and don't know how to write spaces and the following words
Thank you very much for your help
View attachment 3334171
All lowercase letters,I want to ignore it, I don't want it to be translated
/^(?=.*[a-záéíóúñü])(?!.*[A-ZÁÉÍÓÚÑÜ]).*$/gm
or
/^(?=.*[a-záéíóúñü])(?!.*[A-ZÁÉÍÓÚÑÜ]).*$/g
I don't have a suitable trans file to test