Regular expressions

Across allows the use of regular expressions when creating document settings templates for virtually all supported formats. When creating templates, regular expressions can be used to define paragraphs or groups of characters that determine the presentation in crossDesk.

No regular expressions can be defined for the following formats:

  • DTXML (Display texts)

A regular expression is a text pattern made up of both normal characters (e.g. the letters from a to z) and special characters, so-called meta-characters. The pattern specifies one or more character strings for which a match must be found when searching text.

Across uses the .NET specification for regular expressions.

General help for regular expression is available e.g. at RegExr.

Regular expressions at character level

For all supported formats, regular expressions can be used at character level. The respective characters will be then presented as "placeable" in crossDesk. These are gray fields which cannot be edited but only copied to the target text.

Regular expressions at paragraph level

In the case of Excel, Word, and MIF templates, regular expressions can also be used at paragraph level. Here you can determine if the respective paragraphs will be Locked, Hidden or Ignored. If you select Locked, the corresponding paragraphs will be displayed in crossDesk, but cannot be edited. If Hidden has been selected, these paragraphs will not be visible for the translator in crossDesk. Finally, if you select Ignored, the corresponding paragraphs are filtered out at document check-in - also to save system resources - and will not be visible to the project manager either, nor can they be made visible at a later date.

Processing of Regular Expressions

Regular expressions are processed in the order in which they are listed under the Placeables tab. For example, this means that the regular expression for a combination of words must be positioned before the individual words in order for this word combination to be presented as a placeable.


Positioning of the regular expression
Result in crossDesk

Meta Characters for Regular Expressions

The following table contains a complete list of meta characters and their behavior when used in regular expressions:

Stands for any character apart from \n (new line). (In order to reflect all characters including \n, the expression [.\n] must be used.)
A set of characters. Corresponds to every character from those within the given range.
Example: [aeiou] finds every a, e, i, o, u.
A negative set of characters. Corresponds to every character apart from those within the given range. Example: [^aeiou] finds every character except a, e, i, o, u.
A range of characters. Corresponds to every character within the given range. Example: [a-d] finds all lowercase characters from a to d; [0-9] finds every number 0 to 9.
Marks the following character as meta character.
Example: t finds the letter "t". \t finds a tab. To use \ as a normal character, a \ must precede it: \\ finds "\".
Corresponds to the beginning of a line.
Corresponds to the end of a line.
The preceding character (or sub-expression) can occur any amount of times, or not at all.
For example, zo* finds z, zo and zoo.
The preceding character (or sub-expression) occurs one or more times.
Example: zo+ finds zo and zoo, but not z.
The preceding character (or sub-expression) occurs either once or not at all.
For example, zo? finds zo and z, but not zoo.
( )
Grouping. Used to group regular expressions.
An alternative.
Example: German|English finds German or English.

Importing and Exporting Your Regular Expressions

You can export regular expressions of a document settings template in XML format and import them to another template. By exporting your regular expressions in XML format, you can back them up outside Across. You can import and export your regular expressions under Tools > System Settings > Document Settings Templates via the Placeables tab.


If a regular expression already exists in a document settings template, you can overwrite it during import, leave it as it is, or cancel the import.