Regex code for a word that is appearing less than once in a source segment
Thread poster: Lenart

Lenart  Identity Verified
Luxembourg
Local time: 16:29
Jul 8

Hello,

While translating I have to respect a following rule:
If „EU:“ repeats no more than once, there must be a word „sodba“ in the target.
I tried with:
Regex source: (?Less-than sign!EU:)EU:(?!EU:)
By Less-than sign I mean the arrow going back for the purpose of Negative look behind! For some reason this sign is not visible in a chat! (I tried write &lt instead and but it still doesn't appear in the chat)

with other words the code is: (negative look behindEU:)EU:(negative lookaheadEU:)

Regex target: sodba
Condition : if source matches but not the target

I'll just give an example of a typical source text. It seems that this is the easiest way to explain what I need:

I would like to create a code that apply for this kind of case, where EU: appears only once:
(voir, en ce sens, arrêt du 5 septembre 2012, Rahman e.a., C-83/11, EU:C:2012:519, point 21).

However, if EU: appears more than once (meaning it appears for 2, 3, 4, 5, 6 ... times) , I don't want this regex rule to be applied (because for this case, I'll create a different rule). Meaning that the rule does not apply in the following example:

(voir, en ce sens, arrêts du 12 mars 2014, O. et B., C-456/12, EU:C:2014:135, points 50 et 61 ainsi que jurisprudence citée, et du 5 juin 2018, Coman e.a., C-673/16, EU:C:2018:385, point 25).

However in this very last example my code applies and I don’t understand why. Could somebody please explain me why it does apply and how to change the code so that it won't apply in this case in which „EU:“ obviously appears twice.


[Edited at 2018-07-08 09:33 GMT]

[Edited at 2018-07-08 09:36 GMT]

[Edited at 2018-07-08 09:36 GMT]

[Edited at 2018-07-08 09:37 GMT]

[Edited at 2018-07-08 09:41 GMT]

[Edited at 2018-07-08 09:43 GMT]

[Edited at 2018-07-08 09:45 GMT]

[Edited at 2018-07-08 09:47 GMT]

[Edited at 2018-07-08 09:48 GMT]


 

Hans Lenting  Identity Verified
Netherlands
Member (2006)
German to Dutch
HTML codes are still needed in buggy Proz postings editor Jul 8

jyjkf15llcws97oqq5u5.png

(Users have requested Proz a zillion time to fix this erroneous behaviour.)

You'll have to use the HTML entities > and < in your postings to display > and <



[Edited at 2018-07-08 09:41 GMT]


Lenart
 

Lenart  Identity Verified
Luxembourg
Local time: 16:29
TOPIC STARTER
I tried that, but it doesn't work neither Jul 10

Thank you, I tried that, but it doesn't work neither

 


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 appearing less than once in a source segment

Advanced search







WordFinder Unlimited
For clarity and excellence

WordFinder is the leading dictionary service that gives you the words you want anywhere, anytime. Access 260+ dictionaries from the world's leading dictionary publishers in virtually any device. Find the right word anywhere, anytime - online or offline.

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 »



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