Get Trados to flag non-use of a dot as a thousands separator

This regex can no doubt be improved, but I'd like to understand why this basic check isn't working.

At my organization, when laws are referred to, we're supposed to keep the number format of the source text, so if the Spanish says "Decreto 1.234", I must call it "Decree 1.234", not "Decree 1,234" or "Decree 1 234".

Here's something I thought would check for segments where the number format had been changed.

Trados Studio regular expressions search window showing a warning. Description field reads 'Law numbers with a dot in them'. RegEx source field contains '(d.d3) de'. RegEx target field has '$1 of'. Condition set to 'Report if source matches but not the target'.

It's correctly reporting segments where the pattern is matched in the source text (I'm looking for a four-digit number with a dot in it, followed by the word "de"). However, it's flagging rows even where the target sentence contains the correct string (the same number, written exactly the same way, followed by "of"). The only way I can get it to work is if I put "(\d\.\d{3}) of" in the target, but then it won't flag any entries where the number is the same. Am I not using the "$1" correctly?



Generated Image Alt-Text
[edited by: Trados AI at 4:44 AM (GMT 0) on 5 Mar 2024]
emoji