Skip to main content
Skip table of contents

Regular Expression Transformation for User Synchronization

This feature enables administrators to define regular expressions (RegEx) to transform user data during the synchronization process. By setting up RegEx parameters, administrators can extract and modify the necessary information from selected attributes to suit their requirements.

This feature is currently supported only for LDAP and Microsoft Entra ID synchronization sources, available from MyQ Server 10.2 RC 2.

Steps to Use RegEx Transformation for User Synchronization:

  • Accessing Synchronization Settings:

    • Go to MyQ, Settings, User Synchronization.

    • Depending on your setup, double-click either on your LDAP or Microsoft Entra ID Synchronization for the synchronization settings to open on the right.

  • Locating the Transformation Section:

    • In the Users tab, scroll down and expand the Transformation section.

      Transformation section

  • Configuring RegEx Transformation:

    • You can add and configure the following supported user properties:

      • Alias

      • Card

      • PIN

      • Personal number

    • Click Add and for each property, input your desired regular expression in the provided field to modify the respective user property.

  • Testing Your RegEx:

    • After inputting your desired RegEx, you can test its accuracy and functionality.

    • Click the Test button.

    • A dialogue similar to other RegEx test dialogues in MyQ will pop up.

      • Input the string you want to test in the provided field.

      • Input or verify the RegEx expression.

      • Click on the Test button.

    • The resulting data, post-transformation, will be displayed based on your RegEx. This helps ensure that the expression works as intended before applying it to actual user data.

      Testing a RegEx

Regular Expressions provide a powerful way to manipulate user data during synchronization. By employing this feature, administrators can ensure that the imported data into MyQ is precisely in the format and content they desire. Always test your regular expressions before applying them to real data to avoid unexpected results.

Examples

Scenario: Remove any non-digit characters from PINs.

  • RegEx: \d

If the PIN is '12a3b4', the transformed value will be '1234'.

If the source string contains no digit characters, the output value will be empty. Only characters matched by RegEx will be copied to the output.

Scenario: Remove all characters except the alphabetical ones from card numbers.

  • RegEx: [A-Za-z]

For a Card number '1234-5678', this will transform it to '12345678'.

If the source string contains no alphabetical characters, the output value will be empty. Only characters matched by RegEx will be copied to the output.

Scenario: Only keep the first 5 characters of the personal number.

  • RegEx: ^.{5}

For a Personal number '1234567890', this will transform it to '12345'.

If the source string’s length is less than 5 characters, the output value will be empty. Only characters matched by RegEx will be copied to the output.

Scenario: Only keep the last 3 characters of the personal number.

  • RegEx: .{3}$

For a Personal number '1234567890', this will transform it to '890'.

If the source string’s length is less than 3 characters, the output value will be empty. Only characters matched by RegEx will be copied to the output.

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.