Regex code for a word that is repeating exactly twice in a segment
Thread poster: Lenart

Lenart  Identity Verified
Luxembourg
Local time: 14:08
Jul 7

Hello,

While translating I have to respect a following rule:
If „EU:“ repeats exactly twice in the source, there must be a word „sodbi“ in the target.
I tried with:
Regex source: (EU:){2}
Regex target: sodbi
Condition : if source matches but not the target

However, it does not work. Does anybody have an idea where is the problem?


 

Daniel Frisano
Switzerland
Local time: 14:08
Member (2008)
English to Italian
+ ...
Question Jul 7

Are the two occurrences of "EU" seprated by a space? Is it "EUEU" or "EU EU"?

 

Anthony Rudd

Local time: 14:08
German to English
+ ...
Regex for duplicated word Jul 7

Your regex checks for EU:EU:
A more general regex (with one whitespace between the two terms) would be EU:\sEU:
or (with zero or more whitespaces between the two terms) would be EU:\s*EU:
and to match with word boundaries \bEU:\s*EU:\b


 

Lenart  Identity Verified
Luxembourg
Local time: 14:08
TOPIC STARTER
thank you! Jul 8



[Edited at 2018-07-08 08:59 GMT]


 


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


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

Regex code for a word that is repeating exactly twice in a segment

Advanced search







SDL MultiTerm 2019
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2019 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2019 you can automatically create term lists from your existing documentation to save time.

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 »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search