Regular expressions (regex) in a QA profile

Introduction

Regular expressions can be used to perform an in-depth quality assurance check. XTM Cloud provides a series of predefined regexes in the QA profile in XTM UI. You can also add your own custom regex. QA profiles can be global or customer-specific. You can assign just one QA profile to a project, but within that one profile, it is also possible to add multiple QA checks.

IMPORTANT!

Keep in mind that this module requires some previous knowledge of regular expressions!


How does it work?

Regular expressions can be defined in QA profiles in the XTM Cloud UI (see How to create a QA (Quality Assurance) profile and apply it to a project for more information). You can use predefined regexes or create your own ones (custom regexes).

You can use a custom regex to generate QA warnings in a very specific case. In the following example, a regex is used to identify an email address: \b[\w.!#$%&’*+\/=?^`{|}~-]+@[\w-]+(?:\.[\w-]+)*\b.

Use the matching types (broad match/phrase match/exact match) to set the required level of consistency between the source and target text.

Below, see the description of each level, based on the example of the above-mentioned regex pattern for email addresses.

Matching type

Source text (EN)

Target text (EN) generating QA warning

Further explanation

Matching type

Source text (EN)

Target text (EN) generating QA warning

Further explanation

Broad match

It checks if an email address is included in the target.

To find out more, get in touch with our support team: supportxtm-intl.com.

To find out more, get in touch support team: supportxtm-intl.com.

The broad match checks whether the particular text contains an email address (any email address). The email address entered here contains no @ sign → a QA warning is generated.

Broad match produces a QA warning that a different number of matches has been found in the source and target. The regex checks if we the email address is valid. In this case, the email address contains no @ sign: it is not a valid address, so it does not match the regex. A warning is then displayed.

Phrase match

Checks if an email address in the target is exactly the same as in the source.

To find out more, get in touch with our support team: support@cloud.xtm.

To find out more, get in touch with our support team: support@xtm-intl.com.

The phrase match checks whether the target text contains exactly the same email as in the source. The email address entered here is different from the email address entered in the source text: a QA warning is displayed.

If an email address in the target differs from the source, a warning is displayed. In the example, support@xtm-intl.com in the source has been replaced with support@xtm.cloud. The phrase match check generates a warning that would not have been generated by the broad match check.

Exact match

In addition to how the phrase match check works, this checks if the email addresses in the target are exactly in the same sequence.

You can also contact one of our agents: scully@xtm.cloud or mulder@xtm.cloud.

You can also contact one of our agents: mulder@xtm.cloud or scully@xtm.cloud.

The exact match checks whether the target text contains exactly the same email address as in the source and the same sequence of matches.

The email addresses entered here in the source text are the same in the target but the sequence is different: a QA warning is displayed.

A list of email addresses must be displayed in the same sequence, both in the source and target. Only the exact match check generates a warning for this type of error.


Good to know!

QA warnings are displayed in the XTM Workbench QA panel during the QA check. See the relevant article for more information: How to perform a QA check for a file.