Skip to main content

XTM Cloud 13.8

Using a custom regex in the QA profile

Tip

This action requires some prior knowledge of Regular Expressions ("regex").

Table 12. Examples of custom regex validation in the QA profile

Matching type

Source text (EN)

Target text (EN) generating QA warning

Regex pattern used to identify an email address: \b[\w.!#$%&’*+\/=?^`{|}~-]+@[\w-]+(?:\.[\w-]+)*\b

Broad match

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 given text contains an email address (any email address). The email address given here misses the @ sign: we get a QA warning.

QA warnings are displayed in the XTM Workbench QA panel during QA check.

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 given here is different from the email address given in the source text: we get a QA warning.

QA warnings are displayed in the XTM Workbench QA panel during QA check.

Exact match

Additionally to phrase match checks if the email addresses in target are exactly in the same order

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 as in the source and the order of the matches.

The email addresses given here in the source text are the same in the target but the order is different: we get a QA warning.

QA warnings are displayed in the XTM Workbench QA panel during QA check.


Procedure. Adding custom regex to the QA profile

You can use a custom regex to generate QA warnings in a very specific case. In the following example, we use regex to identify an email address.

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

  1. Select the Configuration > Settings > Add QA profile.

  2. In the QA profile popup, add the name for your QA profile.

  3. Scroll down to the Regular expressions section. In it:

    1. in the QA check name text field, enter a unique name.

    2. in the Regular expression text field, enter your regex (for example a regex identifying an email: \b[\w.!#$%&’*+\/=?^`{|}~-]+@[\w-]+(?:\.[\w-]+)*\b.

    3. In the Matching type dropdown, select the relevant option:

      • Broad match: Broad match shows a QA warning for a different number of matches found in the source and in target. The regex checks if we have a valid email address. In this case, the email address is missing @: it is not a valid address so it doesn’t match the regex - we get a warning.

      • Phrase match: If an email address in the target varies from the source, a warning appears. In the example, support@xtm-intl.com in the source has been replaced with support@xtm.cloud - phrase match generates a warning which would have been omitted by the broad matching type.

      • Exact match: A list of email addresses has to appear in the same order both in source and target. Only the exact matching check generates a warning for this type of error.

    Result: your QA check is displayed in the Regular expressions section and by default selected for the relevant QA profile. To deselect it, deselect the checkbox next to its name. To delete your QA check, hover over the relevant QA check and select the x icon close_X-mark_from-UX-team.svg on the right-hand side.

  4. Save the QA profile and add it to your project.

You can add the QA profile during project creation or select it in the Project Editor > General info > General info section.

QA warnings are displayed in the XTM Workbench QA panel during QA check.