Skip to main content

Celonis Product Documentation

Regular expressions for data redaction

In Task Mining, you can create custom data redaction rules to define what type of collected data should be redacted. You can manage your redaction rules using regular expressions in the Task Mining client.

You can create regular expression patterns with the help of free online tools, allowing you to turn standard text into regex. This regex is not case sensitive, meaning that you can use both upper and lowercase text can be matched to your pattern.

Description

Regular Expression

Example - Attribute without masking

Example - Attribute with masking applied

Replace all windows usernames with ‘***’

{{username}}

Saplogon - TR21 - Profile a.doe

Saplogon - TR21 - Profile ***

Replace all machine names with ‘***’

{{machinename}}

System Settings - LP12392

System Settings - ***

Replace all emails with ‘***’

[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+

Outlook - Draft Mail - t.cookofficial@apple.com

Outlook - Draft Mail - ***

Replace all social security numbers with ‘***’

\d{3}-\d{2}-\d{4}

Adobe Acrobat - Verification 1231-21-2929.pdf

Adobe Acrobat - Verification ***.pdf

Replace non-domain part in URL

(?<=((https|http):\/\/)?(www\.)?[a-zA-Z0-9@%()\-+~]+(\.[a-zA-Z0-9@%()\-+~]+)?\.[a-zA-Z0-9()]{1,6}\/)[\S]+

https://www.google.com/search?q=testquery

https://www.google.com/***

Using variables in regular expression patterns

You can also use variables provided by the Task Mining client in the regular expression patterns. This simplifies finding regular expressions, such as the Windows username on each client, instead of specifying and maintaining a list of all possible Windows usernames in the configuration centrally.

Supported variables are:

Description

Name

Example

Windows username

{{username}}

m.doe

Machine name

{{machinename}}

LP1924

Note

The machine name and Windows username are the current user's Windows machine name and Windows username.