Using Regex to Define Domains for WalkMe Injection

Last Updated May 20, 2026

Brief Overview

When configuring a WalkMe extension, you use regex to define which domains WalkMe should inject into. This article covers general regex guidelines and platform-specific examples for Salesforce, Workday, and SuccessFactors.

General Guidelines

Be specific but flexible

Regex should be as specific as possible while still working across different pages. Use customer-specific prefixes to achieve this balance.

Example

  • URL: walkme.my.salesforce.com
  • Use: .*walkme\.my\.salesforce\.com.*
  • Not: .*salesforce\.com.*

Use different regex for each environment

Each environment must have its own unique regex. Use prefixes to differentiate between production and sandbox.

Example

  • Production URL: na3.salesforce.com → Regex: .*na.*\.salesforce\.com.*
  • Sandbox URL: cs23.salesforce.com → Regex: .*cs.*\.salesforce\.com.*

Always wrap regex with .*

Begin and end every regex string with .*

Example

.*salesforce\.com.*

Replace numbers with .*

Instead of using specific digits, use .* in their place.

Example

  • URL: cs23.salesforce.com
  • Regex: .*cs.*\.salesforce\.com.*

Escape periods with \

Always put a \ before every period.

Example

.*salesforce\.com.*

Don't escape hyphens

Example

  • Don't: .*panasonic\-\-full\.salesforce\.com.*
  • Do: .*panasonic--full\.salesforce\.com.*

Use (first|second) for multiple prefixes

To include a URL with two or more different prefixes, use (first|second|third) where the prefixes occur.

Example

  • URLs: walkme.salesforce.com and sandbox.salesforce.com
  • Regex: .*(walkme|sandbox)\.salesforce\.com.*

Use negative lookahead to exclude words

To exclude a specific word from a match, use (?!word).

Example

  • Salesforce Classic: .*cs.*\.salesforce\.com(?!console).*
  • Salesforce Console: .*cs.*\.salesforce\.com/console.*

Combine multiple regex with |

To include more than one regex in a package, separate each with | and no spaces.

Example

.*cs.*\.salesforce\.com.*|.*cs.*\.visual\.force\.com.*

Note

Never leave two consecutive || in a package — this will match all URLs and cause errors on certain sites.

Regex is case sensitive

Always match the exact case of the URL in your regex.

Stricter Domain Regex

In some cases you may need to restrict injection to a specific iFrame while preventing WalkMe from loading in other iFrames that reference the same domain.

Example

  • iFrame to inject into: https://visual.force.com/1000
  • iFrame to exclude: salesforce.com/referrer?=https://visual.force.com/1000

To anchor the match to the beginning of the URL, use:

^https?://[^/]*(visual\.force)\.com

This ensures WalkMe only injects into https://visual.force.com when it appears at the start of the URL.

App-Specific Regex

Salesforce

Salesforce extensions require extra care due to the variance across pages and the presence of analytics iFrames.

When creating the extension:

  • Use negative lookahead to avoid session server and other unnecessary injections: (?!/(login/sessionserver|s\.gif)
  • Use "or" logic within a package rather than creating two separate extensions
  • The server prefix ("na", "ap", "eu", "cs") generally stays the same — stick with the URL you have
Note

When building or testing in Salesforce Lightning, use a new extension without the walkme_ component. For example, walkmecs works but walkme_cs doesn't.

Test environments

Salesforce Classic:

.*customername.*\.cs.*\.my\.salesforce\.com.*|.*cs.*\.salesforce\.com/(?!console).*|.*cs.*\.visual\.force\.com.*

Salesforce Lightning:

.*cs.*\.lightning\.force\.com.*

Salesforce Console:

.*cs.*\.salesforce\.com/console.*

Production environments

Salesforce Classic:

.*customername\.my\.salesforce\.com.*|.*na.*\.salesforce\.com/(?!console).*|.*na.*\.visual\.force\.com.*

Salesforce Lightning:

.*na.*\.lightning\.force\.com.*

Salesforce Console:

.*na.*\.salesforce\.com/console.*
Note

The (?!console) in Classic regex prevents WalkMe from loading Console content in Classic and vice versa.

Workday®

Test: .*impl\.workday\.com/customername.*

Production: .*myworkday\.com/customername.*

SuccessFactors

Test: .*hcm.*preview\.sapsf\.com.*

Production: .*performancemanager.*\.successfactors\.com.*

Note

SuccessFactors URLs don't follow a constant pattern — production and test can be practically identical. If that's the case, use different extensions with the same regex.

Distinguishing Between Similar URLs

When configuring extensions for platforms with similar URLs — for example, standard Salesforce and Salesforce Service Cloud — use regex to differentiate between them.

Normal SFDC URL: https://cs2.salesforce.com/home/home.jsp?tsid=02u0000000000hV

Service Cloud URL: https://cs2.salesforce.com/console?tsid=02u50000000e56v

The difference is the word "console" appearing after salesforce.com. Use this to your advantage:

Service Cloud regex:

.*cs2\.salesforce\.com/console.*

For SFDC, use negative lookahead to exclude any URL where "console" follows salesforce.com:

SFDC regex:

.*cs2\.salesforce\.com/(?!console).*

This matches https://cs2.salesforce.com/home/home.jsp but not https://cs2.salesforce.com/console.

Was this article helpful?

Thanks for your feedback!

Be part of something bigger.

Engage with peers, ask questions, share ideas

Ask the Community
×
The trademarks and product names of Workday, Inc., including the WORKDAY® mark, are the property of Workday, Inc. WalkMe is not affiliated with Workday, Inc., nor does Workday, Inc. sponsor or endorse WalkMe, its services or its website.