A regular expression (regex for short) is a character string that is used to describe a set of character strings. Regular expressions have their origin primarily in software development.
They serve as a kind of advanced search criterion and offer a variety of options for quality management. One of the most well-known applications is the “Search & Replace” feature in many text editors. For example, a text is searched for matches with the pattern of the regular expression that is used as the filter criterion, allowing certain character strings to be quickly found in documents. Regular expressions are described according to distinct syntax and semantics. Even if they appear complex at first glance, it is not at all difficult to use them. Portals such as regexr.com or regular-expressions.info provide useful assistance in the creation of regular expressions.
Simple examples of how to use regex to perform a search in a text:
Specific search
Search for all occurrences of “crossTank” and “crossTerm”.
cross(Tank|Term)
General search
Search for all words that begin with “cross”, then contain an uppercase letter, and then one or more lowercase letters (such as “crossTank”, “crossGrid”, “crossWeb”).
cross[A-Z][a-z]+
How do regular expressions help in quality management?
When properly used, regular expressions have immense potential. In Across, you can use regular expressions as advanced check criteria in your quality management. To do this, you create custom regex checks. The quality management criteria you define in this way check whether a character sequence that you have custom defined has been translated or copied over into the target language correctly. You can also configure the languages in which these checks are to take effect.
Performing custom checks directly in Across saves you time and money and improves the quality of your translations. At the same time, they allow you to keep your data secure within the supply chain. The feature of custom regex checks is available as of the TOPAZ update of Across version v7.0.
Typical cases that allow you to optimize your quality control using custom regex checks include:
- No-break spaces for measurement units, currencies, or the like
- Character strings that have parts that need to be changed during translation, such as language-specific additions in URLs: “.net/de” needs to be updated to “.net/en” in the target language
- Language-specific patterns that perhaps should only be found in the source or target
- Specific rules from style guides, such as spaces for punctuation
How do you define a regex rule in Across?
The use of regex checks for quality control is especially worthwhile if the same errors occur frequently and repeatedly in the translation of certain character strings. We recommend the following steps to create regex checks:
1. Identify common translation errors and how they are similar
Do the errors occur in the same patterns in the text structure, such as in IDs or ISO standards, or do they always appear in similar places (such as before or after punctuation marks)?
2. On this basis, derive the test that the regex check is to perform for you
A regex rule consists of at least one regular expression and a condition that determines where matches are to be searched for and what is to be reported.
3. Writing a regular expression
When formulating a regular expression, make sure that the check covers all cases but does not produce any false positives. The more specific the rule, the better your results. There are useful sites for helping you do this, including www.regexr.com. There you can test your regular expressions and get help on syntax and semantics.
4. Select a language
Once you have formulated the regular expression, all you need to do is select the languages to which the regex check is to be applied. Some criteria may only be suitable for certain languages or language combinations.

Example for the regex check
“Use no-break spaces for units”
Question
Does the source text contain a unit of measurement, currency, or percentage, and does the target text contain a no-break space at this location?
Condition
Report if the source text matches but the target text has fewer matches.
Error description
Missing no-break space between number and commonly used unit symbol
RegEx
(\d{1,3}[., ])*\d+[ ]?([mdchk]?[glmAWV][²³]?\b|[€$£元%])
no-break space, regular space
(\d{1,3}[., ])*\d+[ ]([mdchk]?[glmAWV][²³]?\b|[€$£元%])


Ensuring correct character strings in the target text
Should you use regex checks or placeables?
Two different approaches are now available for ensuring correct copying of individual specific character strings into the target language. Each is particularly suitable for special applications:
Regex checks help you to find certain character strings during quality control. They check whether specific character strings have been correctly copied to the target language. This is ideal for character strings that need to be changed in some way in the target language, for example. They are created as check criteria in the QM Mode v7.0 area of the system settings.
You use placeables to define which fixed terms, character strings, or the like are to be copied into the target language unchanged. These character strings are locked for translation. This affects the work of the translator in crossDesk since fewer words need to be translated. Placeables are defined in the Document Settings area of the system settings.
The decision as to which approach is most appropriate should be made on a case-by-case basis. Here are a few examples to give you ideas:
Quality control with regex checks
Specific character strings that need to be changed in some cases during translation:
- Company-specific codes, part numbers
- Links that need to be adapted for the target language (“… .net/de” → “… .net/en”)
- No-break spaces
- Language character strings
Definition of placeables
Character strings that are language-independent and that should never be changed during translation:
- Placeholders in source code
- ISO/DIN codes
- Version numbers
- Embedded HTML/XML tags, line break symbols
More Expert Features
On-Site Training on Your Premises
Standard and custom training for new or advanced users at your desired date.