Regular Expressions

Usage: Regular Expressions can be used to check for certain text or complex string patterns before existing Nimbus Workflow Activities, e.g. prior to a transfer or announcement.

🔎 Good to know: Below are some common Regular Expressions (RegEx) we recommend to use. Nimbus uses .NET Regular Expressions - you can refer to the Regular Expression Language - Quick Reference for a quick overview of the allowed expressions.

💡Tip: Test your regular expressions using online tools such as RegExr: Learn, Build, & Test RegEx. Using AI-assisted tools like ChatGPT can also prove quite effective in finding your desired outcome.

 

Intended Regex Goal / Description

Regular expression

Incoming Call is from an external PSTN number ^\+[1-9]\d{1,14}$
  • MicrosoftCallerId
Incoming call is from an internal Teams account (UPN) ^[^@]+@.+$
  • CallerUPN

Check country code - Incoming number is from Germany or UK

  • Germany +49
  • UK +44

^([+]49)\d+

^([+]44)\d+

  • MicrosoftCallerId
Caller is anonymous ^Anonymous
  • MicrosoftCallerId
The incoming call is from Switzerland OR Germany ^([+]49)|^([+]41)\d+
  • MicrosoftCallerId
The value equals 1 ^[1]$
  • Queue Position
  • Custom Parameter
The value equals 2 ^[2]$
  • Queue Position
  • Custom Parameter
The value equals or is greater than 3 ^[3-9]$|^([1-9]\d|[1-9]\d{2,})$
  • Queue Position
  • Custom Parameter
No user is available ^[0]$
  • Available Users
  • Custom Parameter
One or more users available ^[1-9]$|^([1-9]\d|[1-9]\d{2,})$
  • Available Users
  • Custom Parameter
The value is true ^(true|True|1)$
  • Custom Parameter
The value is not Empty ^.
  • Custom Parameter
The length of the string is in between 5 or 10 and not less or more ^.{5,10}$
  • Custom Parameter
The length of the string equals 3 ^.{3}$
  • Custom Parameter

Finding all suffixes and variants of a single word:

  • \b ensures word boundaries so it matches whole words only.
  • fail is the root.
  • (?:ed|ing|s)? matches optional suffixes:
    • failed
    • failing
    • fails
    • fail (base form)
\bfail(?:ed|ing|s)?\b

Table of Contents