What is Regex?

Last Updated March 22, 2021

Brief Overview

Regular expressions (AKA regex) allow you to manipulate Dynamic Text that appears in WalkMe content or that is part of automated processes. Using regular expression syntax is ideal for situations where Dynamic Text values you are using contain both the values you want and other characters that aren’t relevant.

Use Cases

Regex use cases include the following:

  • When Dynamic Text includes a user’s first and last name, use regex to select and display only their first name in a ShoutOut or balloon to make it more personal (visual display);
  • Auto-populate your users’ email address (when it’s part of a larger object with additional data) into a text field upon page load (automation);
  • Select only part of a URL when using Dynamic Text to automatically take the user to a different page.

What Regex Format To Use

Begin with an opening regex tag containing the regular expression itself, followed by the statement you wish to apply the regular expression to, and end with a closing regex tag:

[regex=”{the regex itself}“]{text to perform the regex on}[/regex]

Note: {text to perform the regex on} can be a mix of multiple Dynamic Text values (i.e., variables, cookies, WalkMe Data, and jQuery) and static values. Most, if not all uses of text in regex will be dynamic, with minimal use of static text values.

Where Regex Can Be Used

Regex can be inserted into the BBCode of the following step-types and WalkMe items:

  • Visual display;
    • Smart Walk-Thru Step/Popup;
    • ShoutOut;
    • SmartTip (Guidance-type);
    • Survey.
  • Automation.
    • Smart Walk-Thru Auto-Step (Fill Text & Select List Value step-types);
    • Smart Walk-Thru Redirect Step.

Was this article helpful?

Thanks for your feedback!

Select account type

< Back

Mobile account login

< Back