Regex for finding period followed by lowercase letter
Thread poster: Reed James
Reed James
Reed James
Chile
Local time: 14:54
Member (2005)
Spanish to English
Sep 15, 2023

Hi. I'm finishing up a document, and I believe it may have some periods followed by a word with no space in between the two. I have tried ([a-z]) and that works when it comes to finding the lowercase letter, but how do I find the period too?

 
Denis Fesik
Denis Fesik
Local time: 21:54
English to Russian
+ ...
\. to escape Sep 16, 2023

\.([a-z]) and put a tick to enable case-sensitive search. If you're searching from the filter box, you can just leave the square brackets. I think mQ's regex searches work the same way as they do on Trados

 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 21:54
English to Russian
Regex Sep 16, 2023

\.[A-Za-z]

 
Reed James
Reed James
Chile
Local time: 14:54
Member (2005)
Spanish to English
TOPIC STARTER
didn't work Sep 19, 2023

This didn't work. It just highlighted many words in each segment. Actually what I really want to do is find a period followed by a space and then an uppercase or lowercase letter...

 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 21:54
English to Russian
Don't drop the \ Sep 19, 2023

Both regular expressions do the trick. The regex by Denis captures a period followed by a lower case (without any space in between because you did not mention it).
My regex captures a period followed by either lower or upper case (without any space in between again).
If it doesn't work for you, you do something wrong. Most probably you dropped the backslash character at the beginning (I tried to remove it and it caused exactly the same effect that you described above).
Howeve
... See more
Both regular expressions do the trick. The regex by Denis captures a period followed by a lower case (without any space in between because you did not mention it).
My regex captures a period followed by either lower or upper case (without any space in between again).
If it doesn't work for you, you do something wrong. Most probably you dropped the backslash character at the beginning (I tried to remove it and it caused exactly the same effect that you described above).
However, now that you have changed your problem setting by adding a space character, you should use this regex:
\. [A-Ža-ž]
or
\.\s[A-Ža-ž]
The first regex only captures regular white spaces, the second one also captures non-breaking spaces.

[Edited at 2023-09-19 19:05 GMT]
Collapse


 
Tomasz Sienicki
Tomasz Sienicki  Identity Verified
Denmark
Local time: 20:54
Member (2007)
Danish to Polish
+ ...
\. [A-Za-z] Sep 19, 2023

\. [A-Za-z] won't cover the Spanish diacritics such as áéóíúñ; maybe try: \. [A-Za-záéóñÁÉÓÍÚÑ]

 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 21:54
English to Russian
RE: diacritics Sep 19, 2023

Tomasz Sienicki wrote:
\. [A-Za-z] won't cover the Spanish diacritics
Right you are. I have edited the regex to include them all. Thank you.


 
Reed James
Reed James
Chile
Local time: 14:54
Member (2005)
Spanish to English
TOPIC STARTER
This one worked Sep 19, 2023

Thanks!

Stepan Konev wrote:

\.[A-Za-z]


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Regex for finding period followed by lowercase letter






Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »