Regex for finding period followed by lowercase letter
Thread poster: Reed James
Reed James
Reed James
Chile
Local time: 06:35
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: 13:35
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: 13:35
English to Russian
Regex Sep 16, 2023

\.[A-Za-z]

 
Reed James
Reed James
Chile
Local time: 06:35
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: 13:35
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: 12:35
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: 13:35
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: 06:35
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






CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »