Regex mapping in admin user types | XM Community
Skip to main content
Solved

Regex mapping in admin user types

  • September 1, 2023
  • 2 replies
  • 65 views

Forum|alt.badge.img

I am trying to match user type mappings using regex and am looking for some help as to how qualtrics interprets regex.

For example:

If users department is Training Mgr X map the user type to Manager

Would the regex in qualtrics be /Mgr/ for the mapping or \bMgr\b

or how would one write this regex so that it is case insensitive?

Best answer by Gaurav_27

Hi @jbirdman 

You can use regex /Mgr/i for the mapping, which will match any word that contains “Mgr” in any case (e.g., Training Mgr X, training mgr x, TRAINING MGR X, etc.)1. The i flag at the end of the regex makes it case insensitive.

2 replies

Forum|alt.badge.img+10
  • Level 4 ●●●●
  • 48 replies
  • Answer
  • September 2, 2023

Hi @jbirdman 

You can use regex /Mgr/i for the mapping, which will match any word that contains “Mgr” in any case (e.g., Training Mgr X, training mgr x, TRAINING MGR X, etc.)1. The i flag at the end of the regex makes it case insensitive.


Nam Nguyen
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+29
  • QPN Level 8 ●●●●●●●●
  • 1096 replies
  • September 2, 2023

@jbirdman

If users department is Training Mgr X map the user type to Manager

Would the regex in qualtrics be /Mgr/ for the mapping or \bMgr\b

or how would one write this regex so that it is case insensitive?

You can use the i flag at the end of the regex pattern for a case-insensitive match.

The regex /Mgr/i will match anything with mgr like “Tranningmgr X” or “Training Mgr X”

Regex /\bMgr\b/i set boundary so only match if mgr is standingalone so “Tranningmgr X” won’t match and “Training Mgr X” is match.