QA Checker 3.0 > regex code question
Thread poster: Lenart
Lenart
Lenart  Identity Verified
Luxembourg
Local time: 11:41
Mar 12, 2020

Hello,

I am looking for a regex code that would signal me when the only text in the source is a date (date and nothing but the date). The format of the date is always this: 26 mars 2020 followed by a tag.

Any ideas what that piece of code would look like?

thank you and much love and health to all of you!!


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 12:41
English to Russian
Try this Mar 12, 2020

1. This one is for "XX anymonth XXXX" or "X anymonth XXXX"
^\d{1,2}\s(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)\s\d{4}$
If you always have 2 chars for date (including 01, 02, 03, etc.), then remove 1, from the ^\d{1,2} group to read as ^\d{2}

Which tag? I can't figure out a situation with one trailing tag. Formatting (like bold or italics) gives a pair of tags. 'Field' text (like automatic page numbering) or tabs give no tag
... See more
1. This one is for "XX anymonth XXXX" or "X anymonth XXXX"
^\d{1,2}\s(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)\s\d{4}$
If you always have 2 chars for date (including 01, 02, 03, etc.), then remove 1, from the ^\d{1,2} group to read as ^\d{2}

Which tag? I can't figure out a situation with one trailing tag. Formatting (like bold or italics) gives a pair of tags. 'Field' text (like automatic page numbering) or tabs give no tag at all...

2. Try this for dates with any tag(s) at the end:
^\d{1,2}\s(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)\s\d{4}<.*?>$
This portion <.*?> includes both paired and unpaired tags.

3. Try this for dates with an unpaired tag at the end:
^\d{1,2}\s(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)\s\d{4}<.*?/>$

[Edited at 2020-03-13 10:50 GMT]
Collapse


 
Lenart
Lenart  Identity Verified
Luxembourg
Local time: 11:41
TOPIC STARTER
Stepan, thank you for your fast solution! Mar 13, 2020

Stepan, thank you for your fast solution!

 


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


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

QA Checker 3.0 > regex code question







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 »
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 »