# Regex to catch missing glossary translations

**URL:** <https://forum.xbench.net/t/regex-to-catch-missing-glossary-translations/1063>\
**Category:** General Discussion\
**Created:** [September 28, 2023, 11:57am UTC](https://forum.xbench.net/t/regex-to-catch-missing-glossary-translations/1063 "2023-09-28T11:57:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VL2D](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@VL2D](https://forum.xbench.net/u/VL2D)\
**Post date:** [September 28, 2023, 11:57am UTC](https://forum.xbench.net/t/regex-to-catch-missing-glossary-translations/1063/1 "2023-09-28T11:57:12Z")

</div>

Hello Xbench team,

Thank you for the great QA tool! It is really great.

Could you please help me to compile a regex query? It is intended to catch incorrectly used terminology in English-Ukrainian translations I work in. I know about Key Terms function, but it catches issues only in the specified word forms, while Ukrainian is an inflectional language, and a Ukrainian noun can theoretically have up to 14 different word forms (usually less, as some of them can coincide).

For example, I have an approved glossary term, say:  
EN: table  
UK: таблиця

Specifically, the English word “table” can have 4 word forms:  
EN: table, tables, table’s, tables’

The Ukrainian “таблиця” can have the following word forms:  
UK: таблиця, таблиці, таблицю, таблицею, таблиць, таблицям, таблицями, таблицях, таблице

To catch possible mistranslations, I would like to create the regex query which catches segments where the source contains any of “table” word forms, but contains none of “таблиця” word forms. Is that possible with Xbench regex engine?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![omartin](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/omartin/32/82_2.png) [@omartin](https://forum.xbench.net/u/omartin)\
**Post date:** [October 4, 2023, 7:36am UTC](https://forum.xbench.net/t/regex-to-catch-missing-glossary-translations/1063/2 "2023-10-04T07:36:56Z")

</div>

The following search should work:  
Source: `tabl(es?)`  
Target: `-таблиц(я|і|ю|ею|ь|ям|ями|ях|е)`

Search mode: Regular expressions  
Powersearch and Match Whole Word: enabled.

A simpler way to search would be to enter the stem of the word in Russian:  
Source: `tabl(es?)`  
Target: `-таблиц[^[:space:]]{,3}`  
Search mode: Regular expressions  
Powersearch and Match Whole Word: enabled.

---

<div class="post-metadata">

**Author:** ![VL2D](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@VL2D](https://forum.xbench.net/u/VL2D)\
**Post date:** [October 4, 2023, 7:59am UTC](https://forum.xbench.net/t/regex-to-catch-missing-glossary-translations/1063/3 "2023-10-04T07:59:49Z")

</div>

Thank you for your suggestion. I tried similar queries, but it seems that Power Search does not work when a query contains round brackets. Xbench returns the following on both cases:

* * *

## ApSIC Xbench

## Source term error: Expected character: “)”.

## OK

If I change **tabl(es?)** to **table|tables|table’s|tables’** , the version with **-таблиц[\[1\]]{,3}** does work - probably because it does not contain round brackets, so in this case it helps. But it is not always linguistically possible to compile a stem for all possible Ukrainian word forms, that is why I look for a way to type them all directly.

* * *

1. :space:
